From c8e3d67e29ab39300f325b3a230790a716729658 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:01:24 +0000 Subject: [PATCH] Wait for each plugin content subscription id before checking its release (#10012) The plugin-buttons journey reads the details' event subscription id to check that closing, crashing and disabling the content releases it. The id arrives with the daemon's subscription response, after the details render. The first open already waited for it; the reopens read it as soon as the cached summary showed, so the id could still be empty and the release poll then waited for an id that never exists. Every read now waits for a non-empty id. Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- .../app/e2e/support/helpers/plugin-buttons.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/app/e2e/support/helpers/plugin-buttons.ts b/packages/app/e2e/support/helpers/plugin-buttons.ts index b28050fd0..dae18fd1d 100644 --- a/packages/app/e2e/support/helpers/plugin-buttons.ts +++ b/packages/app/e2e/support/helpers/plugin-buttons.ts @@ -198,6 +198,14 @@ async function expectDetails(page: Page) { await expect(page.getByText("All systems operational", { exact: true })).toBeInViewport(); } +// The details render before the daemon answers their event subscription, and reopened +// details show the cached summary at once, so wait for the subscription id to arrive. +async function readContentObservation(page: Page): Promise { + const observation = page.getByLabel("Content observation", { exact: true }); + await expect(observation).not.toHaveText(""); + return (await observation.textContent())!; +} + function workspaceMenuRow(page: Page, title: string): Locator { return compactWorkspaceMenu(page).getByRole("menuitem", { name: title, exact: true }); } @@ -354,14 +362,12 @@ export async function withButtonShowcase( test.step("closing and crashing content release its owner while sibling buttons and app remain live", async () => { await press(page, "Header status"); await expectDetails(page); - const observation = page.getByLabel("Content observation", { exact: true }); - await expect(observation).not.toHaveText(""); - const first = (await observation.textContent())!; + const first = await readContentObservation(page); await press(page, "Close deployment details"); await expect.poll(() => released.has(first)).toBe(true); await press(page, "Composer status"); await expectDetails(page); - const second = (await observation.textContent())!; + const second = await readContentObservation(page); expect(second).not.toBe(first); await workspace.client.renameProject(workspace.projectId, "Observer control"); await expect(page.getByText("Observed updates: 1", { exact: true })).toBeVisible(); @@ -373,7 +379,7 @@ export async function withButtonShowcase( await page.keyboard.press("Escape"); await press(page, "Header status"); await expectDetails(page); - const recovered = (await observation.textContent())!; + const recovered = await readContentObservation(page); expect([first, second]).not.toContain(recovered); await showcase.setTitle("Healthy app after button failure"); await expect(page.getByTestId("workspace-header-title")).toHaveText( @@ -687,9 +693,7 @@ export async function withButtonShowcase( page, page.getByRole("button", { name: "Close deployment details", exact: true }), ); - const observation = page.getByLabel("Content observation", { exact: true }); - await expect(observation).not.toHaveText(""); - const owner = (await observation.textContent())!; + const owner = await readContentObservation(page); await showcase.disable(); await expect.poll(() => released.has(owner)).toBe(true); await expect(