evOo-local/apps/web/e2e/oo-chat-header.spec.ts
cynarAI 81c4bfd7e3
web: move the 1:1 Oo status into the chat header (#193)
The strip under the header of a running 1:1 chat repeated what the header
already carried (a "Present" pill plus a persona line). The header's second
line now shows what the Oo is doing (Working, Thinking, waiting for input,
needs attention, or a delegation), and the bot's role while it rests. The
stage only appears in an empty chat and no longer repeats the name.


Claude-Session: https://claude.ai/code/session_01H3buE7EyYCfz8nYccLCcct

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-10 09:55:01 +02:00

31 lines
1.3 KiB
TypeScript

import { expect, test } from "@playwright/test";
import { captureScreenshot, completeOnboarding, signup } from "./helpers";
test("a 1:1 chat keeps name and status in the header instead of a banner", async ({
page,
}, testInfo) => {
await page.setViewportSize({ width: 390, height: 844 });
await signup(page, `oo-header-${Date.now()}@rakazo.test`, "password12", "Header QA");
await completeOnboarding(page);
const composer = page.getByRole("combobox", { name: /^Message/ });
await composer.fill("Please review `shared/PROJECT_CHECKPOINT_WRAPUP.md`.");
await composer.press("Enter");
await expect(
page
.getByTestId("transcript")
.locator("[data-message-id]")
.filter({ hasText: "done. i handled:" }),
).toBeVisible({ timeout: 30_000 });
await expect(page.getByTestId("oo-stage")).toHaveCount(0);
await expect(page.getByTestId("bot-settings-trigger")).toBeVisible();
await page.emulateMedia({ colorScheme: "light" });
await expect(page.locator("html")).toHaveAttribute("data-theme", "light");
await captureScreenshot(page, testInfo, "oo-chat-header-light");
await page.emulateMedia({ colorScheme: "dark" });
await expect(page.locator("html")).toHaveAttribute("data-theme", "dark");
await captureScreenshot(page, testInfo, "oo-chat-header-dark");
});