Skip to content
File

Blob: tests/e2e/specs/01-oidc-sign-in.spec.ts

typescript20 lines
1import { test, expect, loginViaUi } from "../fixtures/anvil-test";
2 
3test.describe("tessera sign-in", () => {
4 test("creates the operator account from the first verified OIDC identity", async ({
5 livePage,
6 e2eContext,
7 operatorIdentity,
8 }) => {
9 await loginViaUi(livePage, e2eContext, operatorIdentity);
10 
11 await expect(livePage.getByRole("heading", { name: "Projects", exact: true })).toBeVisible();
12 
13 const sessionCookie = (await livePage.context().cookies()).find((cookie) => cookie.name === "__Host-anvil_session");
14 expect(sessionCookie).toBeDefined();
15 expect(sessionCookie?.httpOnly).toBe(true);
16 expect(sessionCookie?.secure).toBe(true);
17 expect(sessionCookie?.sameSite).toBe("Lax");
18 });
19});