adds playwright tests
This commit is contained in:
11
web/tests/playwright/e2e/user/user.spec.ts
Normal file
11
web/tests/playwright/e2e/user/user.spec.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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.locator(".menu .menu-item").filter({ hasText: "Logout" }).click();
|
||||
|
||||
const cookies = await page.context().cookies();
|
||||
const pbAuthCookie = cookies.find(cookie => cookie.name === 'pb_auth');
|
||||
expect(pbAuthCookie).toBeFalsy();
|
||||
});
|
||||
Reference in New Issue
Block a user