From c34629d39e12bf1c8df62931b36fb3e7b66c8162 Mon Sep 17 00:00:00 2001 From: ajnart Date: Wed, 26 Aug 2026 16:36:49 +0200 Subject: [PATCH] test: align private cache e2e --- e2e/lazy-widgets.spec.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/e2e/lazy-widgets.spec.ts b/e2e/lazy-widgets.spec.ts index 4a595f754..3e6f58c5a 100644 --- a/e2e/lazy-widgets.spec.ts +++ b/e2e/lazy-widgets.spec.ts @@ -17,7 +17,7 @@ const adminCredentials = { }; describe("lazy widget application graph", () => { - test("renders an authenticated board and preserves first-use UI behavior after reload", async () => { + test("renders an authenticated board and refetches private widget data after reload", async () => { const { db, localMountPath } = await createSqliteDbFileAsync(); const { userId } = await seedAdminUserAsync(db, adminCredentials); const boardId = createId(); @@ -162,8 +162,9 @@ describe("lazy widget application graph", () => { timeout: 30_000, }); await expect.poll(() => refreshRequestStarted, { timeout: 10_000 }).toBe(true); - await expect(cachedDownload).toBeVisible({ timeout: 5_000 }); - await expect(downloadsWidget.locator("[data-widget-refreshing]")).toBeVisible(); + await expect(cachedDownload).toHaveCount(0); + await expect(downloadsWidget.getByRole("status")).toContainText("Loading widget data"); + await expect(downloadsWidget.locator("[data-widget-refreshing]")).toHaveCount(0); const refreshedDownloadsResponse = page.waitForResponse( (response) => response.url().includes("widget.downloads.getJobsAndStatuses") && response.ok(), @@ -171,7 +172,8 @@ describe("lazy widget application graph", () => { releaseRefresh(); releaseRefresh = undefined; await refreshedDownloadsResponse; - await expect(downloadsWidget.locator("[data-widget-refreshing]")).toHaveCount(0); + await expect(cachedDownload).toBeVisible({ timeout: 30_000 }); + await expect(downloadsWidget.getByRole("status")).toHaveCount(0); await page.unroute(downloadsRequestPattern, delayDownloadsRefresh); expect(pageErrors).toEqual([]); expect(hydrationErrors).toEqual([]);