Files
copilotkit__copilotkit/showcase/integrations/langroid/tests/e2e/readonly-state-agent-context.spec.ts
Jordan Ritter dd06dd89d1 refactor(showcase): rename packages/ to integrations/
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.
2026-04-28 07:47:35 -07:00

28 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 renders with default fields", async ({ page }) => {
await expect(page.locator('[data-testid="context-card"]')).toBeVisible();
await expect(page.locator('[data-testid="ctx-name"]')).toHaveValue("Atai");
});
test("published context JSON reflects initial state", async ({ page }) => {
const json = page.locator('[data-testid="ctx-state-json"]');
await expect(json).toContainText("Atai");
await expect(json).toContainText("America/Los_Angeles");
});
test("sends a message and gets a reply", async ({ page }) => {
const input = page.locator('textarea, [placeholder*="message"]').first();
await input.fill("What do you know about me?");
await input.press("Enter");
await expect(page.locator('[data-role="assistant"]').first()).toBeVisible({
timeout: 30000,
});
});
});