Skip to content

fix(platform): name the dashboard test's controls by key - #4917

Closed
yannickmonney wants to merge 1 commit into
mainfrom
fix/dashboard-test-keys
Closed

yannickmonney wants to merge 1 commit into
mainfrom
fix/dashboard-test-keys

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

Summary

app/routes/dashboard.test.tsx found the session-lapse dialog's confirm button by the bare key sessionLapse.signIn. That only works while nothing has initialised the i18n singleton, because an uninitialised t() returns its key. #4903 made api-client import auth-client-error, which imports the singleton, so since 07419b9c the dashboard's import graph initialises English and the button is named "Sign in". UI (platform 1/4) has failed on every push to main and every release candidate since (the one failing test of 1,582), and the release lane records it as hold H-U1.

Found by bisecting the test alone: green at 6480adee, red at 07419b9c, nothing else between them. This mocks the translation hook the way the sibling session-lapse suites do (session-lapse-drafts.test.tsx, dashboard-layout.test.tsx), so the accessible name is auth.sessionLapse.signIn whatever the graph initialises.

Checklist

  • bun run check — the full gate runs in CI. Locally: the test file 4/4 (it failed 1/4 before), the three session-lapse siblings (43 tests across the four files), and UI (platform 1/4) run whole (results in the comment below).
  • bun run lint:sast — N/A, a test file.
  • Translations — N/A.
  • Docs — N/A.
  • README — N/A.

Test plan

  • cd services/platform && bunx vitest --run --config vitest.ui.config.ts app/routes/dashboard.test.tsx
  • git stash-free proof: on main the same command fails with Unable to find role="button" and name "sessionLapse.signIn".

The dashboard test found the session-lapse dialog's confirm button by the bare
key `sessionLapse.signIn`, which only works while nothing has initialised the
i18n singleton: an uninitialised t() returns its key. #4903 made api-client
import auth-client-error, which imports the singleton, so from 07419b9 on the
dashboard's import graph initialises English and the button is named "Sign in".
The UI shard that holds the file has failed since (found by bisecting the test
alone: green at 6480ade, red at 07419b9, with no other change between).

Mock the translation hook the way the sibling session-lapse suites do, so the
accessible name is `auth.sessionLapse.signIn` whatever the graph initialises.
@yannickmonney

Copy link
Copy Markdown
Contributor Author

Local result for UI (platform 1/4) run whole at this commit (bunx vitest --run --config vitest.ui.config.ts --shard=1/4): 184 test files and 1,582 tests passed. The same shard on main (run 38365231905) reported 1 failed | 1,581 passed.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Folded into #4916, so one CI cycle covers the three repairs that turn main green (its Unit (workspaces) was red only because of the CLI scope tests #4916 repairs).

auto-merge was automatically disabled October 13, 2026 08:38

Pull request was closed

@yannickmonney
yannickmonney deleted the fix/dashboard-test-keys branch November 15, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant