test(e2e): replace stale activity-log skip with active ChatTab assertion #2799

Merged
devops-engineer merged 1 commits from fix/2796-chat-desktop-activity-log-skip into main 2026-06-14 01:07:29 +00:00
2 changed files with 5 additions and 13 deletions
+4 -12
View File
@@ -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 });
});
});
+1 -1
View File
@@ -784,7 +784,7 @@ function MyChatPanel({ workspaceId, data }: Props) {
{thinkingElapsed}s
</div>
{activityLog.length > 0 && (
<div className="mt-1.5 text-[9px] text-ink-mid space-y-0.5">
<div data-testid="activity-log" className="mt-1.5 text-[9px] text-ink-mid space-y-0.5">
<div className="text-ink-mid">Processing with {runtimeDisplayName(data.runtime)}...</div>
{activityLog.map((line, i) => (
<div key={line + i} className="pl-2 border-l border-line"> {line}</div>