test(chat): wait for the queue panel's expand before asserting visibility

Merged
GN
1d ago
+7-5

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 text asserted toBeVisible() right after the click. The panel expands through CollapseExpandMotion, which starts the content at inline opacity: 0 and animates to 1 over 150ms. The assertion only passed when that animation happened to finish first. It now waits for the expanded state with waitFor.

How It Was Tested

  • Before: the test failed on every local run at 12ceed5c and current dev, and twice in CI on #1381. Walking the button's ancestors showed the motion wrapper at opacity: 0; grid-template-rows: 0fr.
  • After: vitest run src/renderer/components/chat/PromptQueuePanel.test.tsx passes 5 out of 5 runs.
  • biome ci on 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.