Files
copilotkit__copilotkit/showcase/packages/langgraph-python/tests/e2e/gen-ui-tool-based.spec.ts
2026-04-08 21:22:35 -07:00

26 lines
799 B
TypeScript

import { test, expect } from "@playwright/test";
test.describe("Tool-Based Generative UI", () => {
test("page loads and chat renders", async ({ page }) => {
await page.goto("/demos/gen-ui-tool-based");
// 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-tool-based");
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
});