ci/woodpecker/pr/ci Pipeline failed
- M1: E2E_REQUIRE_SEEDED_AUTH=1 in the CI e2e step makes login failures hard failures (loginAs throws, guards disabled, globalSetup refuses a pre-populated DB); auth.spec redirect test asserts outright under the flag; non-admin /admin test is now a real authorization assertion - M2: ci.yml build step depends_on test — never two concurrent turbo builds on the shared workspace - M3: unknown /assets/* paths 404 from the SPA catch-all instead of serving index.html with an immutable cache header; spec arm added - minors: e2e step gets when: *image_build_when, health poll uses GATEWAY_PORT + AbortSignal.timeout, BETTER_AUTH_SECRET generated per run (no literal in tree), failure echoes artifact path, dev-guide documents the gate, stale verify-release comment fixed
60 lines
2.2 KiB
TypeScript
60 lines
2.2 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
import { loginAs, REQUIRE_SEEDED_AUTH, TEST_USER } from './helpers/auth.js';
|
|
|
|
test.describe('Settings page', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await loginAs(page, TEST_USER.email, TEST_USER.password);
|
|
const url = page.url();
|
|
test.skip(
|
|
!REQUIRE_SEEDED_AUTH && !url.includes('/chat'),
|
|
'No seeded test user — skipping authenticated tests',
|
|
);
|
|
});
|
|
|
|
test('settings page loads with heading', async ({ page }) => {
|
|
await page.goto('/settings');
|
|
await expect(page.getByRole('heading', { name: /^settings$/i })).toBeVisible({
|
|
timeout: 10_000,
|
|
});
|
|
});
|
|
|
|
test('shows the four settings tabs', async ({ page }) => {
|
|
await page.goto('/settings');
|
|
await expect(page.getByRole('button', { name: /profile/i })).toBeVisible();
|
|
await expect(page.getByRole('button', { name: /appearance/i })).toBeVisible();
|
|
await expect(page.getByRole('button', { name: /notifications/i })).toBeVisible();
|
|
await expect(page.getByRole('button', { name: /providers/i })).toBeVisible();
|
|
});
|
|
|
|
test('profile tab is active by default', async ({ page }) => {
|
|
await page.goto('/settings');
|
|
await expect(page.getByRole('heading', { name: /^profile$/i })).toBeVisible({
|
|
timeout: 10_000,
|
|
});
|
|
});
|
|
|
|
test('clicking Appearance tab switches content', async ({ page }) => {
|
|
await page.goto('/settings');
|
|
await page.getByRole('button', { name: /appearance/i }).click();
|
|
await expect(page.getByRole('heading', { name: /appearance/i })).toBeVisible({
|
|
timeout: 5_000,
|
|
});
|
|
});
|
|
|
|
test('clicking Notifications tab switches content', async ({ page }) => {
|
|
await page.goto('/settings');
|
|
await page.getByRole('button', { name: /notifications/i }).click();
|
|
await expect(page.getByRole('heading', { name: /notifications/i })).toBeVisible({
|
|
timeout: 5_000,
|
|
});
|
|
});
|
|
|
|
test('clicking Providers tab switches content', async ({ page }) => {
|
|
await page.goto('/settings');
|
|
await page.getByRole('button', { name: /providers/i }).click();
|
|
await expect(page.getByRole('heading', { name: /llm providers/i })).toBeVisible({
|
|
timeout: 5_000,
|
|
});
|
|
});
|
|
});
|