Repository navigation
Commit 2627d5d
test(messages): pin the workflow card's click, focus and patient-click paths
Addresses review of a06c980 on the workflow ⓘ card tests.
The click-open check used user.click and findByRole. user.click moves
the pointer onto the trigger, which starts the 300 ms preview rest timer,
and findByRole polls for a second, so the hover could open the card even
if the click did nothing. With user.hover in place of the click, the old
check still passed. The test now opens the card with fireEvent.click,
which moves no pointer, and finds the card synchronously.
The hover test checked that focus was outside the card, which would also
pass if a hover open moved focus to the trigger. It now records the
focused element before the hover and asserts it is unchanged.
The hover test also pins Base UI's patient-click window. A click within
500 ms of a hover open keeps the card open. A click after that toggles
it closed. This matches every other openOnHover="preview" popover, so
the card keeps the library behaviour rather than overriding it.
Each new assertion fails when its behaviour breaks: a blocked Base UI
click handler, a focus move during hover, and a click at 499 ms.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Matt Toohey <[email protected]>1 parent a06c980 commit 2627d5d
1 file changed
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2370 | 2370 | | |
2371 | 2371 | | |
2372 | 2372 | | |
2373 | | - | |
| 2373 | + | |
| 2374 | + | |
2374 | 2375 | | |
2375 | | - | |
| 2376 | + | |
2376 | 2377 | | |
2377 | 2378 | | |
2378 | 2379 | | |
| |||
2383 | 2384 | | |
2384 | 2385 | | |
2385 | 2386 | | |
| 2387 | + | |
2386 | 2388 | | |
2387 | 2389 | | |
2388 | 2390 | | |
2389 | 2391 | | |
2390 | 2392 | | |
2391 | | - | |
| 2393 | + | |
2392 | 2394 | | |
2393 | 2395 | | |
2394 | | - | |
| 2396 | + | |
2395 | 2397 | | |
2396 | 2398 | | |
2397 | 2399 | | |
| |||
2403 | 2405 | | |
2404 | 2406 | | |
2405 | 2407 | | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
2406 | 2419 | | |
2407 | 2420 | | |
2408 | 2421 | | |
| |||
0 commit comments