Files
RenewCMS/features/document_title.qa.md

2.1 KiB

QA: document title (SPA, Vitest only)

Automated (Vitest + Vue Test Utils, real route table, memory history, mocked /v1)

Each test resets document.title to "" in beforeEach.

  1. Back-office rows: with /v1 user mocked as signed in and verified, push each path from the first Examples table, await router.isReady(), assert document.title.
  2. Auth rows: with the session mocked as signed out (401), push each path of the auth Examples table and assert the title equals the card heading plus " · RenewCMS". For the verify noSession row, mock a verify attempt with no session.
  3. Verify with a code and no heading: assert document.title === 'RenewCMS'.
  4. Auth heading change: drive an auth screen through two states with different headings (e.g. reset request default to the incomplete/expired variant) and assert the title follows.
  5. Navigation sequence: /home, /media, /home, asserting after each push.
  6. Login redirect: from /login simulate a successful login so the guard redirects to /home; assert "Home · RenewCMS".
  7. Logout: from /settings trigger logout; assert "Log in · RenewCMS".
  8. Editor: mock GET article 42 with a pending promise, assert "Editor · RenewCMS"; resolve with title "Hello world", assert "Hello world · RenewCMS". Save with title "Hello again" and assert the update. Repeat with a failing GET and with an empty title, expecting "Editor · RenewCMS". Navigate to /article and assert "Articles · RenewCMS".
  9. Not found: push an unknown path, assert "404 · RenewCMS".
  10. Locale: set fr, push /media, assert the French name plus " · RenewCMS"; switch to en and assert "Media · RenewCMS" without a navigation.
  11. Update web/src/components/__tests__/AuthShell.spec.ts if its title expectations no longer hold once the title is set in one place.

Visual

None. The tab title is not drawn on any board (skip: not-visual).

Manual

  • In a real browser, log in from /login and confirm the tab reads "Home · RenewCMS", then use the sidebar and the browser Back and Forward buttons and confirm the tab follows.
  • Open an article in the editor, edit its title, and confirm the tab and the history entry follow.