Files
pocket-id-pocket-id-1/frontend/tests/auth.setup.ts
Jonas Claes 269b5a3c92 feat: add support for translations (#349)
Co-authored-by: Kyle Mendell <kmendell@outlook.com>
Co-authored-by: Elias Schneider <login@eliasschneider.com>
2025-03-20 18:57:41 +00:00

15 lines
403 B
TypeScript

import { test as setup } from '@playwright/test';
import authUtil from './utils/auth.util';
import { cleanupBackend } from './utils/cleanup.util';
const authFile = 'tests/.auth/user.json';
setup('authenticate', async ({ page }) => {
await cleanupBackend();
await authUtil.authenticate(page);
await page.waitForURL('/settings/account');
await page.context().storageState({ path: authFile });
});