fix(e2e): open avatar dropdown before clicking logout button

The logout action was moved into a user avatar dropdown in the nav.
The E2E test was clicking the now-hidden button directly.

Refs #35
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-22 19:44:35 +01:00
parent cf8425d744
commit c84bb3ca7b

View File

@@ -50,6 +50,8 @@ test.describe('Authentication', () => {
test('logout clears the session and redirects to /login', async ({ page }) => {
await login(page);
// Logout is inside the user avatar dropdown — open it first
await page.locator('button[aria-haspopup="true"]').click();
await page.getByRole('button', { name: 'Abmelden' }).click();
await expect(page).toHaveURL(/\/login/);
// Confirm session is gone: navigating to / redirects back