test(ui): clear localStorage between UsagePageView test cases

UsagePageView now persists the selected usage view, activity tab, and
date range to localStorage. Without resetting it in beforeEach, state
written by one test (switching to "tag" view, a different tab, etc.)
leaked into every test that ran after it in the same file, since
vitest doesn't reset localStorage between tests automatically.
This commit is contained in:
spions 2026-08-07 17:28:14 +03:00
parent d1c3e7bcc5
commit 547c5397ca

View file

@ -539,6 +539,10 @@ describe("UsagePage", () => {
};
beforeEach(() => {
// UsagePageView now persists the selected view/tab/date-range to
// localStorage; without clearing it here, whichever test runs first
// pollutes every test after it in this file.
localStorage.clear();
mockUseAuthorized.mockReturnValue({
isLoading: false,
isAuthorized: true,