⚡️(e2e) unique login between tests
We will cache the login token in the browser storage and reuse it between tests. This will speed up the tests and reduce the load on the server.
This commit is contained in:
19
src/frontend/apps/e2e/__tests__/app-impress/auth.setup.ts
Normal file
19
src/frontend/apps/e2e/__tests__/app-impress/auth.setup.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { test as setup } from '@playwright/test';
|
||||
|
||||
import { keyCloakSignIn } from './common';
|
||||
|
||||
setup('authenticate-chromium', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await keyCloakSignIn(page, 'chromium');
|
||||
await page
|
||||
.context()
|
||||
.storageState({ path: `playwright/.auth/user-chromium.json` });
|
||||
});
|
||||
|
||||
setup('authenticate-webkit', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await keyCloakSignIn(page, 'webkit');
|
||||
await page
|
||||
.context()
|
||||
.storageState({ path: `playwright/.auth/user-webkit.json` });
|
||||
});
|
||||
Reference in New Issue
Block a user