fix playwright tests (#759)

This commit is contained in:
slothful-vassal
2026-02-01 21:02:36 +01:00
committed by GitHub
parent 029f1f134b
commit 6d5494935d
8 changed files with 90 additions and 42 deletions

View File

@@ -1,10 +1,12 @@
import { test, expect } from '@playwright/test';
test('logs the user out', async ({ page }) => {
await page.goto('/');
await page.getByRole('button', { name: 'avatar' }).click();
await page.goto('/', { waitUntil: 'networkidle' });
await page.getByLabel('Open user menu').click();
await page.locator(".menu .menu-item").filter({ hasText: "Logout" }).click();
await page.waitForURL('/');
const cookies = await page.context().cookies();
const pbAuthCookie = cookies.find(cookie => cookie.name === 'pb_auth');
expect(pbAuthCookie).toBeFalsy();