Files
serverAppConfigs/tests/e2e/playwright.config.ts
T
Frank 200039d589 test(e2e): cover Grafana relying-party SSO landing (spec 20)
13-sso proves an authenticated session reaches Grafana login page but never
follows the OAuth button, so the relying-party login could be dead (500, or an
email-claim gap bouncing to /login) while the suite stayed green. Spec 20 drives
/login/generic_oauth through the real Anubis+authentik round-trip and asserts a
live session (/api/user 200 with a non-empty email). Wire 20- into the standard
project (qa-e2e session).
2026-10-20 20:40:15 -07:00

63 lines
2.0 KiB
TypeScript

import { defineConfig } from "@playwright/test";
import { BASE_URL, REAL_UA } from "./lib/env";
export default defineConfig({
testDir: "./specs",
timeout: 90_000,
expect: { timeout: 20_000 },
retries: 1,
workers: 2,
fullyParallel: false,
reporter: [["list"]],
outputDir: "./test-results",
use: {
baseURL: BASE_URL,
userAgent: REAL_UA,
ignoreHTTPSErrors: true,
viewport: { width: 1440, height: 900 },
trace: "retain-on-failure",
},
projects: [
{
name: "setup",
testMatch: /00-auth\.setup\.ts/,
},
{
name: "standard",
// NOTE: specs are matched by NUMBER PREFIX, not globbed. A spec file
// whose prefix is not listed in any project silently never runs — a
// green suite with a test that does not exist. 17- joined on 2026-09-16
// (the hermes vhost, whose upstream is a host address rather than a
// container name, so it needs its own pass condition). 18- joined on
// 2026-09-24 (OpenWebUI SSO through authentik). 20- joined on 2026-10-21
// (Grafana's OAuth2 relying-party login, which the edge-only 13- never
// follows).
testMatch: /(10|12|13|16|17|18|20)-.*\.spec\.ts/,
use: { storageState: ".auth/qa-e2e.json" },
dependencies: ["setup"],
},
{
name: "admin",
testMatch: /11-.*\.spec\.ts/,
use: { storageState: ".auth/qa-e2e-admin.json" },
dependencies: ["setup"],
},
{
name: "guest",
testMatch: /(14|15)-.*\.spec\.ts/,
use: { storageState: { cookies: [], origins: [] } },
},
{
name: "frankbook",
// The *arr/qBittorrent walk (19-). Excluded from default runs and from
// the deploy e2e gate unless a frankbook trigger path changed — the
// links terminate on FrankBook-Pro, which sleeps (see tests/e2e/run.sh
// and scripts/deploy.sh). Matched by number prefix like every project
// here; joined 2026-10-05.
testMatch: /19-.*\.spec\.ts/,
use: { storageState: ".auth/qa-e2e-admin.json" },
dependencies: ["setup"],
},
],
});