Files
copilotkit__copilotkit/showcase/integrations/mastra/tests/e2e/auth.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

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();
});
});