Adds an autonomous Playwright suite (acadenice-smoke-full.spec.ts) that drives the prod-like AcadeDoc stack via the UI to surface UI bugs without manual screenshot diagnostic. Each step is wrapped in test.step and records network/console/page errors plus per-step screenshots. A post-test script (scripts/generate-smoke-report.ts) aggregates telemetry into SMOKE-REPORT.md. The smoke runs against the real fork stack (client :5173, server :3001, bridge :4000) using Corentin's prod-like Acadenice credentials. It does NOT share state with the cross-stack e2e suite (no Baserow seeding, no docker-compose-e2e dependency) — its dedicated playwright.smoke.config.ts declares no setup project. Coverage: login, create page, sub-page nesting, wikilink + backlink, slash /database, slash /template, slash /sync-block, workspace graph, space graph. Initial run results (baseline): 2 OK / 7 KO / 0 PARTIAL — confirms SpaceSidebar renders-more-hooks crash when opening "Nouvelle page" submenu (blank-screen Error Boundary), GET /api/acadenice/templates → 403, and space-scoped graph entry point not reachable. Captured in SMOKE-REPORT.md for follow-up by R4.5/R4.6.
57 lines
1.8 KiB
TypeScript
57 lines
1.8 KiB
TypeScript
/**
|
|
* 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"] },
|
|
},
|
|
],
|
|
});
|