mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-04 23:02:32 -05:00
ui test cleanups
* update `msw` 0.49 -> 1.x. (2.x is out now, but small steps.)
* wrap some `jest.{runOnlyPendingTimers,advanceTimersByTime}` calls
in `act`.
* extend a timeout that had no slack at all
This commit is contained in:
@@ -162,7 +162,10 @@ test("slow replace", async () => {
|
||||
expect(screen.getByText(/26 Apr 2021 08:21:13/)).toBeInTheDocument();
|
||||
|
||||
// A loading indicator should show up after a second.
|
||||
expect(await screen.findByRole("progressbar")).toBeInTheDocument();
|
||||
// The default timeout is 1 second; extend it to pass reliably.
|
||||
expect(
|
||||
await screen.findByRole("progressbar", {}, { timeout: 2000 })
|
||||
).toBeInTheDocument();
|
||||
|
||||
// Then the second query result should show up.
|
||||
expect(await screen.findByText(/27 Apr 2021 06:17:43/)).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user