test: add full-stack Playwright integration test infrastructure
Sprint 12 Phase 2: Real integration tests with seed DB - R__seed_test_data.sql (Flyway repeatable, 7 members, strains, batches, docs, board, events) - TestResetController (profile-gated per-test DB reset) - docker-compose.test.yml (self-contained, tmpfs Postgres) - Dockerfile.playwright (v1.60.0, pre-installed deps) - 13 integration spec files, 70+ test cases (@smoke + @full) - seed-constants.ts, selectors.ts, api-client.ts test helpers
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
/**
|
||||
* Deterministic seed data constants matching R__seed_test_data.sql.
|
||||
* Single source of truth for all integration test assertions.
|
||||
*/
|
||||
export const SEED = {
|
||||
club: {
|
||||
id: "a0000000-0000-0000-0000-000000000001",
|
||||
name: "Grüner Daumen e.V.",
|
||||
},
|
||||
admin: {
|
||||
id: "b1000000-0000-0000-0000-000000000001",
|
||||
email: "admin@gruener-daumen.de",
|
||||
password: "TestAdmin123!",
|
||||
},
|
||||
members: {
|
||||
max: {
|
||||
id: "c1000000-0000-0000-0000-000000000001",
|
||||
name: "Max Mustermann",
|
||||
status: "ACTIVE",
|
||||
},
|
||||
anna: {
|
||||
id: "c1000000-0000-0000-0000-000000000002",
|
||||
name: "Anna Schmidt",
|
||||
status: "ACTIVE",
|
||||
},
|
||||
jonas: {
|
||||
id: "c1000000-0000-0000-0000-000000000003",
|
||||
name: "Jonas Weber",
|
||||
status: "ACTIVE",
|
||||
isUnder21: true,
|
||||
},
|
||||
maria: {
|
||||
id: "c1000000-0000-0000-0000-000000000004",
|
||||
name: "Maria Müller",
|
||||
status: "SUSPENDED",
|
||||
},
|
||||
thomas: {
|
||||
id: "c1000000-0000-0000-0000-000000000005",
|
||||
name: "Thomas Müller",
|
||||
status: "ACTIVE",
|
||||
nearQuota: true,
|
||||
},
|
||||
lisa: {
|
||||
id: "c1000000-0000-0000-0000-000000000006",
|
||||
name: "Lisa Bauer",
|
||||
status: "ACTIVE",
|
||||
},
|
||||
karl: {
|
||||
id: "c1000000-0000-0000-0000-000000000007",
|
||||
name: "Karl Fischer",
|
||||
status: "EXPELLED",
|
||||
},
|
||||
},
|
||||
strains: {
|
||||
northernLights: {
|
||||
id: "d1000000-0000-0000-0000-000000000001",
|
||||
name: "Northern Lights",
|
||||
thc: 18.5,
|
||||
cbd: 0.5,
|
||||
},
|
||||
cbdCriticalMass: {
|
||||
id: "d1000000-0000-0000-0000-000000000002",
|
||||
name: "CBD Critical Mass",
|
||||
thc: 5.0,
|
||||
cbd: 12.0,
|
||||
},
|
||||
amnesiaHaze: {
|
||||
id: "d1000000-0000-0000-0000-000000000003",
|
||||
name: "Amnesia Haze",
|
||||
thc: 22.0,
|
||||
cbd: 0.1,
|
||||
},
|
||||
},
|
||||
batches: {
|
||||
northernLights: {
|
||||
id: "e1000000-0000-0000-0000-000000000001",
|
||||
quantity: 500,
|
||||
status: "AVAILABLE",
|
||||
},
|
||||
cbdCriticalMass: {
|
||||
id: "e1000000-0000-0000-0000-000000000002",
|
||||
quantity: 300,
|
||||
status: "AVAILABLE",
|
||||
},
|
||||
amnesiaHaze: {
|
||||
id: "e1000000-0000-0000-0000-000000000003",
|
||||
quantity: 200,
|
||||
status: "RECALLED",
|
||||
},
|
||||
},
|
||||
documents: {
|
||||
satzung: {
|
||||
id: "f1000000-0000-0000-0000-000000000001",
|
||||
title: "Vereinssatzung 2024",
|
||||
category: "SATZUNG",
|
||||
},
|
||||
protokoll: {
|
||||
id: "f1000000-0000-0000-0000-000000000002",
|
||||
title: "Protokoll MV März 2024",
|
||||
category: "PROTOKOLL",
|
||||
},
|
||||
genehmigung: {
|
||||
id: "f1000000-0000-0000-0000-000000000003",
|
||||
title: "KCanG-Genehmigung",
|
||||
category: "GENEHMIGUNG",
|
||||
},
|
||||
mietvertrag: {
|
||||
id: "f1000000-0000-0000-0000-000000000004",
|
||||
title: "Mietvertrag",
|
||||
category: "VERTRAG",
|
||||
},
|
||||
},
|
||||
board: {
|
||||
vorsitz: {
|
||||
id: "g1000000-0000-0000-0000-000000000001",
|
||||
title: "Vorsitzende/r",
|
||||
elected: "Max Mustermann",
|
||||
},
|
||||
kasse: {
|
||||
id: "g1000000-0000-0000-0000-000000000002",
|
||||
title: "Kassenführung",
|
||||
elected: "Anna Schmidt",
|
||||
},
|
||||
schrift: {
|
||||
id: "g1000000-0000-0000-0000-000000000003",
|
||||
title: "Schriftführung",
|
||||
vacant: true,
|
||||
},
|
||||
},
|
||||
counts: {
|
||||
totalMembers: 7,
|
||||
activeMembers: 5,
|
||||
documents: 4,
|
||||
batches: 3,
|
||||
availableBatches: 2,
|
||||
boardPositions: 3,
|
||||
vacantPositions: 1,
|
||||
},
|
||||
kcang: {
|
||||
adultDailyLimitGrams: 25,
|
||||
adultMonthlyLimitGrams: 50,
|
||||
under21MonthlyLimitGrams: 30,
|
||||
under21MaxThcPercent: 10,
|
||||
},
|
||||
} as const
|
||||
Reference in New Issue
Block a user