mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
26 lines
786 B
TypeScript
26 lines
786 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Agentic Generative UI", () => {
|
|
test("page loads and chat renders", async ({ page }) => {
|
|
await page.goto("/demos/gen-ui-agent");
|
|
|
|
// Chat interface should be visible
|
|
await expect(page.getByPlaceholder("Type a message")).toBeVisible();
|
|
});
|
|
|
|
test("can send a message and receive a response", async ({ page }) => {
|
|
await page.goto("/demos/gen-ui-agent");
|
|
|
|
const input = page.getByPlaceholder("Type a message");
|
|
await input.fill("Hello");
|
|
await input.press("Enter");
|
|
|
|
// Wait for agent response (adjust timeout as needed)
|
|
await expect(page.locator('[data-role="assistant"]').first()).toBeVisible({
|
|
timeout: 30000,
|
|
});
|
|
});
|
|
|
|
// TODO: Add feature-specific assertions
|
|
});
|