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.
30 lines
871 B
TypeScript
30 lines
871 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Chat Customization (CSS)", () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("/demos/chat-customization-css");
|
|
});
|
|
|
|
test("scoped wrapper applies CopilotKit variable override", async ({
|
|
page,
|
|
}) => {
|
|
const scope = page.locator(".chat-css-demo-scope").first();
|
|
await expect(scope).toBeVisible();
|
|
|
|
// The --copilot-kit-primary-color variable should resolve to #ff006e
|
|
// inside the scoped wrapper.
|
|
const primary = await scope.evaluate((el) =>
|
|
getComputedStyle(el)
|
|
.getPropertyValue("--copilot-kit-primary-color")
|
|
.trim(),
|
|
);
|
|
expect(primary).toBe("#ff006e");
|
|
});
|
|
|
|
test("chat input is present", async ({ page }) => {
|
|
await expect(page.getByPlaceholder("Type a message")).toBeVisible({
|
|
timeout: 10000,
|
|
});
|
|
});
|
|
});
|