/** * Playwright config dedicated to the AcadeDoc smoke suite (R4.7). * * Differs from the cross-stack e2e config (playwright.config.ts) on three * intentional points: * * 1. No setup project — the smoke suite drives the real prod-like stack * (Docmost server :3001, client :5173, bridge :4000) that is already up. * There is no Baserow seeding, no e2e-only docker-compose, no synthetic * admin user. The suite logs in via the UI with the real Acadenice user. * * 2. Single Chromium project, no shared storageState. The login spec is the * entry point and seeds an in-process auth via cookie inheritance inside * the suite itself. * * 3. Reporters: list (live), html (debugging), json (machine-readable for * SMOKE-REPORT.md generation). */ import { defineConfig, devices } from "@playwright/test"; import * as dotenv from "dotenv"; import * as path from "path"; dotenv.config({ path: path.resolve(__dirname, ".env.smoke") }); const BASE_URL = process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:5173"; export default defineConfig({ testDir: "./tests", testMatch: /acadenice-smoke-full\.spec\.ts/, fullyParallel: false, workers: 1, // Smoke must reveal failures, not retry them away. retries: 0, reporter: [ ["list"], ["html", { outputFolder: "smoke-report", open: "never" }], ["json", { outputFile: "smoke-results.json" }], ], outputDir: "smoke-test-results", use: { baseURL: BASE_URL, screenshot: "only-on-failure", video: "retain-on-failure", trace: "retain-on-failure", actionTimeout: 15_000, navigationTimeout: 30_000, }, timeout: 90_000, expect: { timeout: 10_000 }, projects: [ { name: "smoke-chromium", use: { ...devices["Desktop Chrome"] }, }, ], });