test(chat): wait for the queue panel's expand before asserting visibility
Merged
GN
1d ago+7+7+0123456789-5-5-0123456789
Summary
Fixes a racy assertion in PromptQueuePanel.test.tsx that fails Lint, Typecheck & Test on dev and blocks the v0.4.50 release PR (#1381).
Related Issue
No related issue. CI repair on dev.
Type of Change
- test: adding or updating tests
What Changed
mobile shell > expands on tap and names each action after its queued textassertedtoBeVisible()right after the click. The panel expands throughCollapseExpandMotion, which starts the content at inlineopacity: 0and animates to 1 over 150ms. The assertion only passed when that animation happened to finish first. It now waits for the expanded state withwaitFor.
How It Was Tested
- Before: the test failed on every local run at
12ceed5cand currentdev, and twice in CI on #1381. Walking the button's ancestors showed the motion wrapper atopacity: 0; grid-template-rows: 0fr. - After:
vitest run src/renderer/components/chat/PromptQueuePanel.test.tsxpasses 5 out of 5 runs. -
biome cion the changed file passes.
Checklist
- Conventional-commit PR title
- No unrelated modifications
- Read AGENTS.md
Summary by cubic
Fixes a flaky assertion in PromptQueuePanel.test.tsx that failed CI and blocked the v0.4.50 release. The test now waits for the panel's expansion animation to finish before checking visibility, instead of asserting immediately after click.