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

24 lines
704 B
TypeScript

import { expect, test } from "@playwright/test";
import {
clickBeautifulChatPill,
openBeautifulChat,
} from "./beautiful-chat-helpers";
test.describe("Beautiful Chat pie chart", () => {
test.beforeEach(async ({ page }) => {
await openBeautifulChat(page);
});
test("Pie Chart pill renders controlled generative UI", async ({ page }) => {
await clickBeautifulChatPill(page, "Pie Chart (Controlled Generative UI)");
const circles = page.locator("svg circle");
await expect
.poll(async () => await circles.count(), { timeout: 45_000 })
.toBeGreaterThanOrEqual(3);
await expect(page.getByText(/\d+%/).first()).toBeVisible({
timeout: 5_000,
});
});
});