From 57e200480df1980a180fe690905dacf4c71c69d2 Mon Sep 17 00:00:00 2001 From: ss-dev-00 Date: Wed, 26 Aug 2026 17:07:53 -0700 Subject: [PATCH] test(desktop): assert the Commands status row in the drawer's reading variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `observer-feed-screenshots` 09 asserted the `available_commands_update` lifecycle row as `getByText("Commands", { exact: true })`. That located the dense variant's separate title span. The observer feed ("View activity") is hosted by the agent activity cover drawer, so once the pin commit made the drawer render the `conversation` variant, a plain lifecycle status recedes to a `ConversationDivider` whose label is the joined `title · text` — and the exact text node stopped existing. The row is NOT dropped: the failure screenshot shows "Commands · Commands available: 3" rendered as the centered divider. So this is a stale assertion against the new presentation, not lost content, and the pin is correctly scoped — the drawer IS the reading surface here. Replaces the bare text node with three assertions that are strictly stronger: the lifecycle row exists, it carries `data-variant="conversation-divider"`, and its full text is the joined label. A variant flip and a dropped detail half now each fail, where the old assertion could only see one span. Tests 08/10 in the same spec never caught this because their `getByText` calls are non-exact and match the joined label by substring. Co-authored-by: Bradley Axen Signed-off-by: Bradley Axen Signed-off-by: ss-dev-00 --- .../e2e/observer-feed-screenshots.spec.ts | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/desktop/tests/e2e/observer-feed-screenshots.spec.ts b/desktop/tests/e2e/observer-feed-screenshots.spec.ts index 44ff609c9e..e7fd359bc4 100644 --- a/desktop/tests/e2e/observer-feed-screenshots.spec.ts +++ b/desktop/tests/e2e/observer-feed-screenshots.spec.ts @@ -606,9 +606,25 @@ test.describe("observer feed screenshots", () => { }, ]); - await expect(feedPanel.getByText("Commands", { exact: true })).toBeVisible({ - timeout: 5_000, - }); + // This panel is the agent activity cover drawer, so it renders the reading + // (`conversation`) variant, where a plain lifecycle status recedes to a + // centered divider whose label joins the title and detail. The row is not + // lost — the previous `getByText("Commands", { exact: true })` encoded the + // dense variant's separate title span, so it stopped describing this + // surface the moment the variant was pinned to the drawer. + // + // Asserting the row, its recede presentation and its full joined label is + // strictly stronger than the bare text node it replaces: a variant flip or + // a dropped detail half both fail here. + const commandsRow = feedPanel + .getByTestId("transcript-lifecycle-item") + .filter({ hasText: "Commands available: 3" }); + await expect(commandsRow).toBeVisible({ timeout: 5_000 }); + await expect(commandsRow).toHaveAttribute( + "data-variant", + "conversation-divider", + ); + await expect(commandsRow).toHaveText("Commands · Commands available: 3"); await settleAnimations(feedPanel); await feedPanel.screenshot({ path: `${SHOTS}/09-available-commands-update.png`,