From 8b9d7a25049f45869fc2f60d81830546ddc9fa26 Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Sun, 14 Jun 2026 00:59:25 +0000 Subject: [PATCH] test(e2e): replace stale activity-log skip with active ChatTab assertion (#2796) The desktop chat E2E test was gating on a [data-testid='activity-log'] that no element in the current ChatTab layout produces, so it recorded a normal-path test.skip() on every run. - Add data-testid='activity-log' to the inline live-activity container that renders while the agent is thinking. - Replace the conditional skip in chat-desktop.spec.ts with an active visibility assertion scoped to #panel-chat. Fixes #2796 Co-Authored-By: Claude --- canvas/e2e/chat-desktop.spec.ts | 16 ++++------------ canvas/src/components/tabs/ChatTab.tsx | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/canvas/e2e/chat-desktop.spec.ts b/canvas/e2e/chat-desktop.spec.ts index b33d8a81d..05f02d392 100644 --- a/canvas/e2e/chat-desktop.spec.ts +++ b/canvas/e2e/chat-desktop.spec.ts @@ -122,18 +122,10 @@ test.describe("Desktop ChatTab", () => { await textarea.fill("Trigger activity"); await page.getByRole("button", { name: /Send/ }).first().click(); - // FALSE-GREEN FIX: the prior `.catch(() => {})` swallowed the assertion - // entirely, so this test passed whether or not the activity log ever - // rendered. The activity-log container is optional per layout, so we - // gate on its presence in the DOM: if it's not part of this layout, - // skip explicitly (a recorded skip, not a silent pass); if it IS - // present, it MUST become visible during the send flow — that's the - // behaviour this test exists to protect. - const activityLog = page.locator("[data-testid='activity-log']").first(); - if ((await activityLog.count()) === 0) { - test.skip(true, "activity-log not part of this layout"); - return; - } + // The activity log renders inline in the current ChatTab layout while the + // agent is thinking. It must become visible during the send flow and then + // clears once the response arrives. + const activityLog = page.locator("#panel-chat [data-testid='activity-log']").first(); await expect(activityLog).toBeVisible({ timeout: 10_000 }); }); }); diff --git a/canvas/src/components/tabs/ChatTab.tsx b/canvas/src/components/tabs/ChatTab.tsx index 0b1425f8b..e9aeae6ed 100644 --- a/canvas/src/components/tabs/ChatTab.tsx +++ b/canvas/src/components/tabs/ChatTab.tsx @@ -784,7 +784,7 @@ function MyChatPanel({ workspaceId, data }: Props) { {thinkingElapsed}s {activityLog.length > 0 && ( -
+
Processing with {runtimeDisplayName(data.runtime)}...
{activityLog.map((line, i) => (
◇ {line}
-- 2.52.0