Files
RenewCMS/features/roles_sync_read_own.qa.md
T

3.1 KiB

QA procedure: Read = Own surfaces (roles sync pass 6)

Spec: features/roles_sync_read_own.feature. Vitest + Vue Test Utils under task test:web. /v1 mocked through the existing kits; sessions from web/src/test/access.ts (customAccess with content.read=own). No live server.

Honesty rules

  1. Baseline task test:web first. 1. Runner cannot execute: NOT RUN. 2. Report new and edited specs and baseline failures. 3. EN is asserted; FR only for the editor note (the design gives it); FR for the banners and empty states is proposed (gap G1). 4. No spec freezes the date.

Automated (Vitest)

Spec Cases
views/tests/RoleEditorView.spec.ts (extend) info alert present/absent with Read own/all, live toggle, read-only editor, EN/FR text
lib/tests/rolePreview.spec.ts (extend) Articles and custom-type sentences for Read own, All-types grouping, "read only their own" gone, Read all unchanged
views/tests/ArticlesReadOwn.spec.ts (new; the articles list specs today are ArticlesPagination, ArticlesSitesAuthors, SeoArticles) banner and header for Read own, tabs from counts (5/3/2), Draft tab empty state with counts 3/3/0, banner absent and existing empty state for Read all, counts taken as returned
views/tests/ContentList.spec.ts (extend) Read own header, banner, "3 entries", no pager; empty state with the singular noun (Events, Recipes, Press mentions, Categories); Read all unchanged
views/tests/ContentListNavigation.spec.ts or an entry-not-found spec (extend) direct link 404 shows the existing page and no hint
lib/tests/relationSentences.spec.ts (extend) the singular helper on the four names of the feature
i18n/roleMessages.spec.ts (extend) the new keys exist in EN and FR, placeholders match

Mocks to reuse: Pedro Lima (Junior writer), the board's 3 online articles and 2 drafts; Events with 3 entries and with none.

Visual (task visual:check)

All under the roles screen (user decision): "Role editor: Read set to Own", "Articles list: Read = Own", "Articles list: no drafts of their own", "Entry list: Read = Own", "Entry list: no entries of their own". web/visual/states.ts gets the setups. Board data: Pedro Lima, All 5 / Online 3 / Draft 2, All 3 / Online 3 / Draft 0, Events "3 entries". Light, dark, desktop, mobile within 10 %.

Manual checks

  1. Real flow: create "Junior writer" with Read Own, assign it to a user, open /articles and /content/events as that user, compare tabs with the database.
  2. Two browsers: the owner publishes a draft of someone else while the Junior writer has the list open; reload shows the new online count.
  3. FR read-through.
  4. task lint:web green; task test:web exit 0.

Design gaps and notes

  • G1 FR for the banners and empty states is not in the design.
  • G2 The singular noun is derived from the type name; irregular names ("People", "Series") produce a wrong noun. A per-type singular name is a possible later field.
  • G3 The mobile layout of the banner is read from the board frame.
  • Backend: no change; counts and totals already come from the API (CountVisibleTo).