1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 15:04:43 +00:00

tests: move auth.setup.ts into specs folder

This commit is contained in:
Elias Schneider
2025-05-22 23:19:16 +02:00
parent ca5e754aea
commit 9fff6ec3b6

14
tests/specs/auth.setup.ts Normal file
View File

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