test: add delay wait for TimePicker handler in test case
- Add 150ms delay wait after time input change to ensure handler completes - Fixes test case that was failing due to 0.1s delay in handleStartTimeChangeWithClose
This commit is contained in:
committed by
Benoit TELLIER
parent
8b88faffe2
commit
a541111f88
@@ -408,6 +408,11 @@ describe("CalendarApp integration", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// Wait for the 0.1s delay in handleStartTimeChangeWithClose to complete
|
||||
await act(async () => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 150));
|
||||
});
|
||||
|
||||
const saveButton = screen.getByRole("button", { name: /save/i });
|
||||
await act(async () => {
|
||||
saveButton.click();
|
||||
|
||||
Reference in New Issue
Block a user