fix: override reducedMotion for CSS transition check in phone dock scroll test#864
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
9361e37
into
codex/design-audit-main-safe-20260719-clean
CI failure in
tests/ui-tools.spec.ts:1036— the "phone bottom search dock hides while scrolling down on search results" test assertedtransitionDuration >= 100msbut received0.01ms.Root cause:
playwright.config.tsglobally setscontextOptions: { reducedMotion: "reduce" }to prevent animation-race flakes. The dock element carriesmotion-reduce:transition-none, so under that context the computedtransitionDurationcollapses to ~0 — the assertion can never pass.Fix: Temporarily lift reduced motion with
page.emulateMedia({ reducedMotion: "no-preference" })for the CSS inspection step only, then restore"reduce"before the scroll-behavior assertions.Summary
tests/ui-tools.spec.ts— no production code modified.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 changedUI verification not run: test-only change, no production UI modified.Risk and rollout
emulateMedialines.Clinical Governance Preflight
Not applicable — no clinical, ingestion, answer, search, source, privacy, or deployment behavior changed.
Notes