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:
@@ -1,6 +1,7 @@
|
||||
import { defineConfig } from "@playwright/test"
|
||||
import path from "path"
|
||||
|
||||
import { defineConfig } from "@playwright/test"
|
||||
|
||||
const authFile = path.join(__dirname, "e2e", ".auth", "admin.json")
|
||||
|
||||
export default defineConfig({
|
||||
@@ -9,7 +10,7 @@ export default defineConfig({
|
||||
retries: 0,
|
||||
timeout: 90_000,
|
||||
use: {
|
||||
baseURL: "http://localhost:3000",
|
||||
baseURL: process.env.BASE_URL || "http://localhost:3000",
|
||||
screenshot: "on",
|
||||
trace: "on-first-retry",
|
||||
navigationTimeout: 60_000,
|
||||
@@ -22,8 +23,7 @@ export default defineConfig({
|
||||
},
|
||||
{
|
||||
name: "authenticated",
|
||||
testMatch:
|
||||
/authenticated-admin|visual-regression|accessibility/,
|
||||
testMatch: /authenticated-admin|visual-regression|accessibility/,
|
||||
dependencies: ["setup"],
|
||||
use: {
|
||||
storageState: authFile,
|
||||
@@ -36,6 +36,17 @@ export default defineConfig({
|
||||
/functional-flows|full-check|user-story-tests|system-test|staff-management|screenshot-tour|authenticated-tour/,
|
||||
use: { browserName: "chromium" },
|
||||
},
|
||||
{
|
||||
name: "integration",
|
||||
testMatch: /integration\//,
|
||||
dependencies: ["setup"],
|
||||
use: {
|
||||
storageState: authFile,
|
||||
browserName: "chromium",
|
||||
},
|
||||
timeout: 90_000,
|
||||
expect: { timeout: 15_000 },
|
||||
},
|
||||
],
|
||||
outputDir: "./e2e/test-results",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user