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.
26 lines
866 B
TypeScript
26 lines
866 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Auth", () => {
|
|
test("page loads with authenticated banner by default", async ({ page }) => {
|
|
await page.goto("/demos/auth");
|
|
await expect(page.getByTestId("auth-banner")).toBeVisible();
|
|
await expect(page.getByTestId("auth-banner")).toHaveAttribute(
|
|
"data-authenticated",
|
|
"true",
|
|
);
|
|
await expect(page.getByTestId("auth-sign-out-button")).toBeVisible();
|
|
});
|
|
|
|
test("sign out flips banner to unauthenticated and reveals Sign in button", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/demos/auth");
|
|
await page.getByTestId("auth-sign-out-button").click();
|
|
await expect(page.getByTestId("auth-banner")).toHaveAttribute(
|
|
"data-authenticated",
|
|
"false",
|
|
);
|
|
await expect(page.getByTestId("auth-authenticate-button")).toBeVisible();
|
|
});
|
|
});
|