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:
14
tests/specs/auth.setup.ts
Normal file
14
tests/specs/auth.setup.ts
Normal 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 });
|
||||
});
|
||||
Reference in New Issue
Block a user