mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
17 lines
663 B
TypeScript
17 lines
663 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
const admin = process.env.ADMIN_URL;
|
|
if (!admin) throw new Error('Run E2E through npm run verify:e2e');
|
|
|
|
test('unauthenticated admin access reaches the real login boundary', async ({ page }) => {
|
|
const pageErrors: string[] = [];
|
|
page.on('pageerror', (error) => pageErrors.push(error.message));
|
|
|
|
await page.goto(admin);
|
|
await expect(page).toHaveURL(/\/login$/);
|
|
await expect(page.getByRole('heading', { name: 'Welcome Back' })).toBeVisible();
|
|
await expect(page.getByLabel('Email Address')).toBeVisible();
|
|
await expect(page.getByLabel('Password')).toBeVisible();
|
|
expect(pageErrors).toEqual([]);
|
|
});
|