Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import "@testing-library/jest-dom";
import { afterAll, afterEach, beforeAll, vi } from "vitest";
import { afterAll, afterEach, beforeAll, beforeEach, vi } from "vitest";
import { cleanup } from "@testing-library/react";
import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import { ELECTRON_MIGRATE_DISMISSED_KEY } from "@/lib/electronMigrate";
import { server } from "./msw/server";
import { resetProviderState } from "./msw/state";
import "./msw/tauriMocks";
Expand All @@ -22,6 +23,12 @@ beforeAll(async () => {
});
});

beforeEach(() => {
// The migrate dialog is a top-layer modal. Leave it dismissed unless a test
// explicitly clears this key, or App integration queries cannot see the shell.
window.localStorage.setItem(ELECTRON_MIGRATE_DISMISSED_KEY, "1");
});

afterEach(() => {
cleanup();
window.localStorage.clear();
Expand Down