mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
dd06dd89d1
The showcase framework directories better reflect their role as integration examples rather than distributable packages. Renames showcase/packages/ -> showcase/integrations/ and updates the test docker-compose file reference accordingly.
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Readonly State (Agent Context)", () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("/demos/readonly-state-agent-context");
|
|
});
|
|
|
|
test("context card and JSON preview render", async ({ page }) => {
|
|
await expect(page.locator('[data-testid="context-card"]')).toBeVisible();
|
|
await expect(page.locator('[data-testid="ctx-state-json"]')).toBeVisible();
|
|
});
|
|
|
|
test("changing the name input updates the JSON preview", async ({ page }) => {
|
|
const name = page.locator('[data-testid="ctx-name"]');
|
|
await name.fill("Alice");
|
|
|
|
const json = page.locator('[data-testid="ctx-state-json"]');
|
|
await expect(json).toContainText('"name": "Alice"');
|
|
});
|
|
|
|
test("changing the timezone updates the JSON preview", async ({ page }) => {
|
|
const tz = page.locator('[data-testid="ctx-timezone"]');
|
|
await tz.selectOption("Europe/London");
|
|
|
|
const json = page.locator('[data-testid="ctx-state-json"]');
|
|
await expect(json).toContainText("Europe/London");
|
|
});
|
|
});
|