import { test } from "../support/fixtures"; import { withTimelinePlugin, requestPluginTimeline, interactWithStreamingCard, expectWholeCompletedCard, expectBothConsecutiveTools, } from "../support/helpers/plugin-timeline"; for (const width of [1100, 390]) { test(`assistant plugin receives the whole streaming message at width ${width}`, async ({ page, }, info) => { await page.setViewportSize({ width, height: 900 }); await withTimelinePlugin(page, info, "assistant", async (agent) => { await requestPluginTimeline(agent); await interactWithStreamingCard(page); await agent.client.waitForFinish(agent.agentId, 30_000); await expectWholeCompletedCard(page); // Local state is checked during growth; the viewport remounts on the history handoff. await page.reload({ waitUntil: "domcontentloaded" }); await expectWholeCompletedCard(page); }); }); } test("Overview preserves both consecutive tool plugin cards", async ({ page }, info) => { await withTimelinePlugin(page, info, "tools", async (agent) => { await requestPluginTimeline(agent); await agent.client.waitForFinish(agent.agentId, 30_000); await expectBothConsecutiveTools(page); await page.reload({ waitUntil: "domcontentloaded" }); await expectBothConsecutiveTools(page); }); });