Repository navigation
test(mirror-fold): wait for the phone header instead of sampling it - #3204
Conversation
choose() sampled `.app-header .context-tabs` with isVisible() right after the page was resized from a desktop-wide window to 390 px. The header still held the desktop tab row at that moment (#3156 moved it into the header), so the test took the desktop branch and hovered a strip the phone layout then took away: "hover: Timeout ... element was detached from the DOM". Callers now say which layout they expect, and the phone branch waits for the phone's title before opening More.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
Merge note (merge pass) at head 2de8c35:
|
Summary
scripts/mirror-fold-demo-regression.tsfails on main (6dfcc17) in CI and on old-desktop alone:choose()→hover: Timeout 10000ms exceededon.tab-strip, "element was detached from the DOM".Cause:
choose()decided phone vs desktop with a one-shotisVisible()on.app-header .context-tabs, right after the page was resized from a desktop-wide window (844/915 px) to 390 px. The fold state it waits for first is already true at 844, so nothing waited for the phone layout. Since #3156 the desktop tab row lives in the header; at that moment the header still held it, so the test took the desktop branch and hovered a strip that the phone layout then removed.Diagnostic run on old-desktop (plain main, instrumented
choose):The app ends in the right layout; only the test sampled it too early. Not a product bug.
Fix (test only): callers say which layout they expect; the phone branch waits for the phone's title (
locator.waitFor()) before opening More. No sleeps, no retries.Validation
scripts/mirror-fold-demo-regression.ts20/20 PASS on old-desktop (ovis-remote-check, where plain main fails),FAILS=0.bun run check fast: green (typecheck, build, unit 12806 pass / 0 fail).