mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-02 03:53:13 +00:00
fix(work-orders): unfreeze visual-spec timers for board error retry
Use setFixedTime so React Query can finish the 500 retry and render the alert.
This commit is contained in:
parent
b50ebcff42
commit
abc14ed8f9
1 changed files with 1 additions and 2 deletions
|
|
@ -83,8 +83,7 @@ function isBoardDetail(pathname: string) {
|
|||
}
|
||||
|
||||
async function mockWorkOrderApi(page: Page, mode: "default" | "empty" | "error" = "default") {
|
||||
await page.clock.install({ time: new Date(FROZEN_NOW) });
|
||||
await page.clock.resume();
|
||||
await page.clock.setFixedTime(new Date(FROZEN_NOW));
|
||||
await page.addInitScript((user) => localStorage.setItem("auth", JSON.stringify(user)), TEST_USER);
|
||||
|
||||
await page.route("**/api/**", async (route) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue