16 lines
605 B
JavaScript
16 lines
605 B
JavaScript
// @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');
|
|
});
|
|
});
|