Skip to content

Commit b0df377

Browse files
committed
test: debug localstorage
1 parent 58bb796 commit b0df377

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

e2e/tests/ui/charts.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ test("charts are restored from localStorage after reload", async ({ page }) => {
3838
await page.getByTestId("add-chart-button").click();
3939
await expect(page.getByTestId("chart")).toHaveCount(initialCount + 2);
4040

41-
// Give Zustand persist time to flush to localStorage before reloading
42-
await page.waitForTimeout(300);
41+
console.log("Before reload:", await page.evaluate(() => localStorage.getItem("testing-view-storage")));
4342

4443
// Reload — Zustand should restore all charts from localStorage
4544
await page.reload();
4645
await waitForHydration(page);
4746

47+
console.log("After reload:", await page.evaluate(() => localStorage.getItem("testing-view-storage")));
48+
4849
await expect(page.getByTestId("chart")).toHaveCount(initialCount + 2);
4950
});

0 commit comments

Comments
 (0)