refactor(e2e): migrate all tests to Playwright Test
This commit is contained in:
parent
174c6c001e
commit
7900f264ba
14 changed files with 398 additions and 401 deletions
16
tests/e2e/auth-guard.spec.js
Normal file
16
tests/e2e/auth-guard.spec.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// @ts-check
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
test.describe('Auth guard', () => {
|
||||
test('unauthenticated /manage/credentials redirects to /login', async ({ page }) => {
|
||||
await page.goto('/manage/credentials');
|
||||
await page.waitForURL('**/login', { timeout: 5000 });
|
||||
expect(page.url()).toContain('/login');
|
||||
});
|
||||
|
||||
test('unauthenticated /manage/credentials?setup=1 redirects to /login', async ({ page }) => {
|
||||
await page.goto('/manage/credentials?setup=1');
|
||||
await page.waitForURL('**/login', { timeout: 5000 });
|
||||
expect(page.url()).toContain('/login');
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue