From 76ced148ae7e55a7b2e2c5ad1d96de19eca8db90 Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Tue, 18 Aug 2026 15:59:18 +0000 Subject: [PATCH] test(desktop): require linked PR loading capture state Signed-off-by: loganj Co-authored-by: Claude Code --- .../workstream-board-b3-pr.capture.spec.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/desktop/tests/e2e/workstream-board-b3-pr.capture.spec.ts b/desktop/tests/e2e/workstream-board-b3-pr.capture.spec.ts index 6d42139a26..bf4c0ad2d5 100644 --- a/desktop/tests/e2e/workstream-board-b3-pr.capture.spec.ts +++ b/desktop/tests/e2e/workstream-board-b3-pr.capture.spec.ts @@ -6,21 +6,13 @@ test("continuous relay-backed Workstream Board bullet 3 PR-status demo", async ( page, }, testInfo) => { test.setTimeout(120_000); - await installRelayBridge(page, "tyler", { seedPreviewFeatures: true }); + await installRelayBridge(page, "tyler", { + seedPreviewFeatures: true, + relayPullRequestQueryDelayMs: 2_500, + }); await page.goto("/", { waitUntil: "domcontentloaded" }); await expect(page.getByTestId("app-sidebar")).toBeVisible(); await expect(page.getByTestId("open-workstream-board-view")).toBeVisible(); - // Hold only the authenticated NIP-34 root query long enough for the - // continuous artifact to show the promised loading -> live transition. - await page.route("http://localhost:3000/query", async (route) => { - const body = route.request().postDataJSON() as Array<{ - kinds?: number[]; - }> | null; - if (body?.some((filter) => filter.kinds?.includes(1618))) { - await new Promise((resolve) => setTimeout(resolve, 1_500)); - } - await route.continue(); - }); await page.getByTestId("open-workstream-board-view").click(); const board = page.getByTestId("workstream-board-view"); @@ -58,7 +50,8 @@ test("continuous relay-backed Workstream Board bullet 3 PR-status demo", async ( const pullRequest = card.getByTestId("workstream-pull-request"); await expect(pullRequest).toBeVisible(); - await expect(pullRequest).toContainText(/Loading…|B3 linked PR/); + await expect(pullRequest).toContainText("Loading…"); + await page.waitForTimeout(1_000); await page.screenshot({ path: testInfo.outputPath("b3-loading.png"), fullPage: true,