Skip to content

Commit 346c80c

Browse files
committed
test: preserve standard activity coverage (#84)
1 parent c3b3383 commit 346c80c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎tests/e2e/chat.spec.ts‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ test("coalesces durable agent activity and applies activity preferences", async
447447
const me = (await meResponse.json()) as { user: { id: string } };
448448
const notificationStorageKey = `clickclack:browser-notifications-enabled:v1:${me.user.id}`;
449449
await page.addInitScript((storageKey) => {
450-
localStorage.setItem("clickclack:message-layout:v1", "outlined");
451450
type CapturedNotification = { title: string; close: () => void };
452451
const target = window as unknown as {
453452
__clickclackNotifications: CapturedNotification[];
@@ -566,6 +565,12 @@ test("coalesces durable agent activity and applies activity preferences", async
566565
await expect(preambleItems.nth(2)).toContainText("Commentary after the first tool");
567566
await expect(preambleItems.nth(3)).toContainText("read");
568567

568+
await page.evaluate(() => {
569+
localStorage.setItem("clickclack:message-layout:v1", "outlined");
570+
document.documentElement.setAttribute("data-message-layout", "outlined");
571+
});
572+
await expect(page.locator("html")).toHaveAttribute("data-message-layout", "outlined");
573+
569574
const chainAnswer = page.locator(".message-row.after-preamble", {
570575
has: page.getByText("Deployment boundary is healthy.", { exact: true }),
571576
});
@@ -598,6 +603,12 @@ test("coalesces durable agent activity and applies activity preferences", async
598603
expect(chainRadii.topLeft).toBe(0);
599604
expect(chainRadii.bottomLeft).toBeGreaterThan(0);
600605

606+
await page.evaluate(() => {
607+
localStorage.removeItem("clickclack:message-layout:v1");
608+
document.documentElement.removeAttribute("data-message-layout");
609+
});
610+
await expect(page.locator("html")).not.toHaveAttribute("data-message-layout");
611+
601612
// A live turn is one synthetic row anchored at its first activity message.
602613
// Later same-turn rows grow that existing virtual item without changing the
603614
// list length. Keep the timeline pinned through those resizes.

0 commit comments

Comments
 (0)