mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-28 17:25:04 +03:00
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
16 lines
469 B
TypeScript
16 lines
469 B
TypeScript
import { test as setup } from '@playwright/test';
|
|
import { pathFromRoot } from 'utils/fs.util';
|
|
import authUtil from '../../utils/auth.util';
|
|
import { cleanupBackend } from '../../utils/cleanup.util';
|
|
|
|
const authFile = pathFromRoot('.tmp/auth/user.json');
|
|
|
|
setup('authenticate', async ({ page }) => {
|
|
await cleanupBackend();
|
|
|
|
await authUtil.authenticate(page);
|
|
await page.waitForURL('/settings/account');
|
|
|
|
await page.context().storageState({ path: authFile });
|
|
});
|