Files
pocket-id/frontend/tests/auth.setup.ts

15 lines
403 B
TypeScript
Raw Normal View History

2024-08-12 11:00:25 +02:00
import { test as setup } from '@playwright/test';
import authUtil from './utils/auth.util';
2024-08-12 11:00:25 +02:00
import { cleanupBackend } from './utils/cleanup.util';
const authFile = 'tests/.auth/user.json';
setup('authenticate', async ({ page }) => {
2025-01-19 15:41:16 +01:00
await cleanupBackend();
2024-08-12 11:00:25 +02:00
await authUtil.authenticate(page);
2024-08-12 11:00:25 +02:00
await page.waitForURL('/settings/account');
await page.context().storageState({ path: authFile });
});