Align prescribing smoke test with back-link accessible name - #1787
Conversation
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:dec736ecf1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await expect(page).toHaveURL(/\/medications\/acamprosate$/, { timeout: 30_000 }); | ||
| await expectSingleMedicationPage(page); | ||
| await expect(page.getByRole("link", { name: "Medications", exact: true }).first()).toBeVisible(); | ||
| await expect(page.getByRole("link", { name: "Back to medications" }).first()).toBeVisible(); |
There was a problem hiding this comment.
Update the mobile back-link locator as well
When verify:ui reaches the adjacent mobile prescribing case, it still queries the link as name: "Medications", exact: true at line 3441, while InPageNavHeader assigns aria-label="Back to medications" at every breakpoint. The critical desktop case will now pass, but the PR UI suite will fail in the mobile case before its touch-target and navigation assertions; update both locators and run the named mobile test as the smallest proof.
Useful? React with 👍 / 👎.
Summary
tests/ui-smoke.spec.tsin the prescribing critical flow because the locator expected the visible label ("Medications") instead of the link’s accessible name ("Back to medications").Verification
npm run verify:pr-localDuring development, use
npm run verify:cheapas the faster iteration gate before the final PR-local preflight.npm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changednpm run verify:releasebefore release or handoff confidence claimsFor retrieval, ranking, selection, chunking, source/citation rendering, or answer-contract changes,
verify:pr-localrunseval:rag:offlineautomatically. Run the offline command directly during iteration before spending a live eval.npm run eval:retrieval:quality(must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.npm run eval:rag -- --limit 15+npm run eval:quality -- --rag-onlywhen answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)npm run check:production-readinesswhen clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changednpm run check:deployment-readinesswhen deployment startup, hosting, or rollout behavior changedVerification not run: full PR template gates were not executed for this scoped test-assertion correction.
Risk and rollout
Complete this section for clinical, data, API, auth/privacy, workflow, dependency, build, or deployment changes.
tests/ui-smoke.spec.ts.Clinical Governance Preflight
Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.
Not applicable: test-only change; no clinical or production data-path changes.
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes