Commit dc70cdb
committed
fix: flaky focus test on Windows by waiting for debounce timer
The test 'does not grab focus when follow-up question presented' was
failing intermittently on Windows because the 50ms debounced focus
effect in ChatView could fire after mockFocus.mockClear() was called.
Added explicit delays (100ms) after state changes to ensure the
debounced effect completes before clearing mocks or making assertions.
This eliminates the race condition that caused the test to pass on
Ubuntu but fail on Windows.1 parent 703a296 commit dc70cdb
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
472 | 476 | | |
473 | 477 | | |
474 | 478 | | |
| |||
494 | 498 | | |
495 | 499 | | |
496 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
497 | 504 | | |
498 | 505 | | |
499 | 506 | | |
| |||
0 commit comments