kundencenter/ops/test/compose.yml
Claude (KI) 9138d5dcb9 Browser-Abnahme mit Playwright und axe (#39, #15)
- apps/e2e: echte API + Web gegen kundencenter_e2e, Superadmin mit 2FA wird
  vorab angelegt. Abläufe: Login-Seite (Tastatur, falsches Passwort),
  Personal-Login mit 2FA + Abmelden (Sitzung beendet, geschützte Seite
  leitet um), Kundenanlage → Einladung → Kundenlogin, Mandantentrennung
  (fremde Organisation/Mitglieder 403/404, Verwaltung 401/403), 2FA-Replay.
- Projekte: Desktop hell und 360 px dunkel (touch); axe nach WCAG 2.2 AA auf
  Login, Dashboard, Kundenliste, Kunden-Dashboard – schwere/kritische
  Verstöße = rot. Lokal: 8/8 grün.
- ops/test/run-e2e.sh (Playwright-Image) und zweiter CI-Job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:57:20 +02:00

46 lines
1.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Isolierte Testumgebung (#96): wegwerfbare MariaDB im RAM + Test-Container mit eingebundenem Repo.
# Keine echten Geheimnisse, keine Verbindung zu Produktivdatenbank oder Anbietern.
# Start: ops/test/run.sh (oder: docker compose -f ops/test/compose.yml run --rm tests)
name: kc-test
services:
db:
image: mariadb:11.4
environment: { MARIADB_ROOT_PASSWORD: testroot }
command: ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
tmpfs: [/var/lib/mysql]
healthcheck: { test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"], interval: 2s, timeout: 5s, retries: 30 }
tests:
build: .
depends_on: { db: { condition: service_healthy } }
working_dir: /w
volumes: ["../..:/w"]
environment:
CI: "1"
KC_ENV_DIR: /nonexistent
KC_TEST_DB_RESET: "1"
DB_HOST: db
DB_PORT: "3306"
DB_NAME: kundencenter_test
DB_USER: root
DB_PASSWORD: testroot
# Dummy-Schlüssel (32 Byte, base64) – nur für Tests
KC_SECRET_KEY: dGVzdC1zY2hsdWVzc2VsLW51ci1mdWVyLWNpLTMyLWI=
LICENSE_PROGRAM_KEY: 00000000-0000-0000-0000-000000000000
command: ["bash", "ops/test/ci.sh"]
e2e:
image: mcr.microsoft.com/playwright:v1.63.0-noble
depends_on: { db: { condition: service_healthy } }
working_dir: /w
volumes: ["../..:/w"]
environment:
CI: "1"
KC_ENV_DIR: /nonexistent
KC_TEST_DB_RESET: "1"
DB_HOST: db
DB_PORT: "3306"
DB_USER: root
DB_PASSWORD: testroot
KC_SECRET_KEY: dGVzdC1zY2hsdWVzc2VsLW51ci1mdWVyLWNpLTMyLWI=
LICENSE_PROGRAM_KEY: 00000000-0000-0000-0000-000000000000
# SKIP_BUILD=1 (docker compose run -e SKIP_BUILD=1 e2e) überspringt den Build bei wiederholten Läufen
command: ["bash", "-c", 'corepack enable && corepack prepare pnpm@10.14.0 --activate && pnpm install --frozen-lockfile && { [ -n "$${SKIP_BUILD:-}" ] || pnpm build; } && cd apps/e2e && pnpm e2e']