fix(test): hermetically exercise auth workflows

This commit is contained in:
2026-08-25 18:27:41 +02:00
parent 2c2bf1940b
commit db375298d0
5 changed files with 34 additions and 10 deletions
+3 -2
View File
@@ -142,9 +142,10 @@ test("OIDC Authorization Code plus PKCE redirects back and maps ordinary and adm
expect(stack.lastAuthorization()).toMatchObject({ codeChallengeMethod: "S256", pkceVerified: true });
await expectNoWebStorageTokens(page);
await page.getByRole("button", { name: "Log out", exact: true }).click();
await expect(page.getByRole("heading", { name: "Sign in to ThothII" })).toBeVisible();
await expect(page.getByRole("button", { name: "Log out", exact: true })).toHaveCount(0);
await page.context().clearCookies();
stack.setOidcIdentity("admin");
await page.goto(stack.publicUrl);
await signInWithOidc(page);
await expectShell(page);
expect((await browserSession(page)).body.roles).toEqual(["admin"]);