feat(auth): sign out from the app header

The shell had no way to end a session on shared booth machines; the new
button signs out and returns to the login page.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-21 00:45:36 +00:00
parent 8601a6014f
commit 2fc71883d7
3 changed files with 54 additions and 0 deletions
+13
View File
@@ -55,6 +55,19 @@ test.describe("app shell", () => {
);
});
test("signs out and locks the shell again", async ({ page }) => {
await page.setViewportSize({ width: 1024, height: 768 });
await signInAs(page, `e2e-signout-${Date.now()}@example.com`);
await page.goto(`${BASE}/home`);
await page.getByRole("button", { name: "Sign out" }).click();
await expect(page).toHaveURL(`${BASE}/login`);
// The session cookie is gone, so the guarded shell bounces back to login.
await page.goto(`${BASE}/home`);
await expect(page).toHaveURL(`${BASE}/login`);
});
test("redirects unauthenticated users away from the shell", async ({ page }) => {
await page.setViewportSize({ width: 360, height: 780 });
await page.goto(`${BASE}/schedule`);