Files
copilotkit__copilotkit/showcase/integrations/ms-agent-harness-dotnet/tests/e2e/beautiful-chat-bar-chart.spec.ts
2026-05-26 13:36:38 -07:00

25 lines
719 B
TypeScript

import { expect, test } from "@playwright/test";
import {
clickBeautifulChatPill,
openBeautifulChat,
} from "./beautiful-chat-helpers";
test.describe("Beautiful Chat bar chart", () => {
test.beforeEach(async ({ page }) => {
await openBeautifulChat(page);
});
test("Bar Chart pill renders recharts bars", async ({ page }) => {
await clickBeautifulChatPill(page, "Bar Chart (Controlled Generative UI)");
await expect(
page.locator(".recharts-responsive-container").first(),
).toBeVisible({ timeout: 45_000 });
await expect
.poll(async () => await page.locator(".recharts-bar-rectangle").count(), {
timeout: 15_000,
})
.toBeGreaterThanOrEqual(2);
});
});