Research-Stack/4-Infrastructure/k3s-flake/tests/playwright.config.ts
Brandon Schneider 5f372ea04d test(infra): add Playwright E2E routing test suite
Tests the full traffic path against live researchstack.info infrastructure:
  Edge Caddy (TLS) → Tailscale → Traefik Ingress → k3s services

Coverage:
- edge-tls-redirects: HTTPS reachability, cert validity, legacy subdomain
  301s (status/dash/home/media/books/music/vault/pulse/apps), stable
  subdomains (auth, mail), wildcard fallback
- path-routing: /apps/*, /server/*, /api/* routes; prefix stripping; SSO
  redirect vs token-auth isolation
- auth-integration: Authentik login page, OIDC discovery, forward_auth
  gating on protected paths, /api/* bypass

19/40 tests pass against current live infrastructure (pre-deploy). The 21
failures are "not yet deployed" signals, not design errors. Run after each
phase of the deployment plan to use as a regression gate.

Run: cd 4-Infrastructure/k3s-flake/tests && npm test

Generated with Devin (https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-05-26 21:03:27 -05:00

37 lines
908 B
TypeScript

import { defineConfig } from '@playwright/test';
/**
* Playwright config for Research Stack end-to-end routing tests.
*
* Tests the full traffic path:
* Internet → Edge Caddy (TLS) → Traefik Ingress → k3s services
*
* Run against live infrastructure:
* npx playwright test
*
* Run against a specific base URL (e.g. local sim):
* BASE_URL=http://localhost:8080 npx playwright test
*/
export default defineConfig({
testDir: '.',
testMatch: '**/*.spec.ts',
timeout: 30_000,
retries: 1,
use: {
baseURL: process.env.BASE_URL || 'https://researchstack.info',
ignoreHTTPSErrors: true,
extraHTTPHeaders: {
'User-Agent': 'ResearchStack-Playwright-E2E/1.0',
},
},
projects: [
{
name: 'chromium',
use: { browserName: 'chromium' },
},
],
reporter: [
['list'],
['html', { open: 'never', outputFolder: 'test-results' }],
],
});