fix(test): use /formulation/worry so phone chrome dock is present in the assertion#1247
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
…hrome test /?mode=documents in its home state sets heroOwnsPhoneComposer=true which prevents the bottom dock from rendering, so .answer-footer-search-backdrop inside .answer-footer-search-dock is absent from the DOM and the assertion returns 'missing' instead of 'none'. /formulation/worry is a non-home GlobalSearchShell route where isStandaloneModeHome=false → desktopHomeComposerSlotId=undefined → heroOwnsPhoneComposer=false → the compact bottom dock IS rendered on phones, and the backdrop div is in the DOM (hidden via the new CSS rule).
a5f0591
into
codex/standardize-header-and-footer-behavior
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad0b2d6f66
ℹ️ 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".
| // is false here so the bottom dock IS rendered and the backdrop is present in | ||
| // the DOM (CSS hides it). /?mode=documents in its home state sets | ||
| // heroOwnsPhoneComposer=true and omits the dock entirely. | ||
| await gotoPhoneSurface(page, "/formulation/worry"); |
There was a problem hiding this comment.
Select a route that actually renders the footer dock
When this test navigates to /formulation/worry, isInformationPage() classifies it as an information page (src/lib/information-pages.ts:42), while shouldShowSearchComposer suppresses composers on information pages unless isToolDetailWithFooterSearch() accepts them (global-search-shell.tsx:203-208,329-334); that exception covers only services, forms, and medications. Consequently, .answer-footer-search-dock remains absent, dockBackdropDisplay is still "missing", and the assertion expecting "none" fails. Use a non-information, non-home route that renders the compact dock.
Useful? React with 👍 / 👎.
The new Playwright test added in this PR asserted
dockBackdropDisplay === "none", but navigated to/?mode=documentswhose home state setsheroOwnsPhoneComposer=true— preventing the bottom dock from rendering entirely.querySelector(".answer-footer-search-backdrop")returnednull, yielding"missing"instead of"none".Changes
tests/ui-phone-scroll.spec.ts— changed navigation target from/?mode=documentsto/formulation/worry/formulation/worryis a non-homeGlobalSearchShellroute:isStandaloneModeHome=false→desktopHomeComposerSlotId=undefined→heroOwnsPhoneComposer=false→ compact bottom dock IS rendered on phonesdisplay: nonerule the PR introducedlongRoutesscroll-geometry suite, so CI behaviour is well-understoodVerification
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 changedRisk and rollout
Test-only change. No production code modified.
Clinical Governance Preflight
Not applicable — no clinical, ingestion, retrieval, source, or environment behaviour changed.
Notes