File
Blob: tests/e2e/specs/02-oidc-returning-user.spec.ts
| 1 | import { test, expect, loginViaUi } from "../fixtures/anvil-test"; |
| 2 | |
| 3 | test.describe("tessera returning user", () => { |
| 4 | test("logs in with the existing tessera identity", async ({ livePage, e2eContext, operatorIdentity }) => { |
| 5 | await loginViaUi(livePage, e2eContext, operatorIdentity); |
| 6 | |
| 7 | await expect(livePage.getByRole("heading", { name: "Projects", exact: true })).toBeVisible(); |
| 8 | }); |
| 9 | |
| 10 | test("session persists across page reload", async ({ livePage, e2eContext, operatorIdentity }) => { |
| 11 | await loginViaUi(livePage, e2eContext, operatorIdentity); |
| 12 | |
| 13 | await livePage.reload({ waitUntil: "networkidle" }); |
| 14 | |
| 15 | await expect(livePage).toHaveURL(/\/app\/projects/); |
| 16 | await expect(livePage.getByRole("heading", { name: "Projects", exact: true })).toBeVisible(); |
| 17 | }); |
| 18 | }); |