Files
oto-enterprise-os-dtp/tests/playwright.config.ts
T
Claude Code DTP Worker 1a87b22fd7 [DTP-Worker] Sprint 1 · Baseline QA Playwright (4 endpoints) + fix gate rouge
Livrable QA Sprint 1 (roadmap §Sprint 1 · GAP_ANALYSIS §7) : projet Playwright
auto-contenu sous tests/, data-driven sur e2e/routes.json pour /waf-home /crm
/qa /choisir-mon-unite. 4 contrôles/route : status<400 · HTML titré+lang ·
brand luxury (#0a0a12/#f0b429 + Fraunces/Cormorant) · zéro erreur JS/5xx.
Cible via DTP_BASE_URL (aucune URL codée en dur). Zéro invention de chiffres (#6).

- tests/{playwright.config.ts,package.json,tsconfig.json,.gitignore,README.md}
- tests/e2e/{routes.json,smoke.spec.ts,_shared/contract.ts}
- CI : job e2e-baseline manuel (workflow_dispatch) dans .gitea/workflows/ci.yml
  — hors gate push/PR (exige serveur live), Gitea Actions only (#2)
- Fix : gate CI rouge sur HEAD (guard flaguait sa propre doc de test négatif)
  → escape hatch documenté ci-allow. Les 3 scripts du gate repassent verts.
- GAP_ANALYSIS §7 : critère Baseline Playwright →  (exécution VPS différée)
- daily report 2026-07-30 (session 2)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-30 01:02:04 +00:00

46 lines
1.6 KiB
TypeScript

// ============================================================================
// Playwright · baseline QA · OTO Enterprise OS DTP
// ----------------------------------------------------------------------------
// Cible configurable via DTP_BASE_URL (aucune URL codée en dur → run local,
// VPS interne, ou domaine public selon l'environnement du runner).
// export DTP_BASE_URL=https://otov7.com # public
// export DTP_BASE_URL=http://153.75.250.214 # VPS interne
// Voir tests/README.md.
// ============================================================================
import { defineConfig, devices } from '@playwright/test';
const BASE_URL = process.env.DTP_BASE_URL ?? 'https://otov7.com';
const IS_CI = !!process.env.CI;
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: IS_CI,
retries: IS_CI ? 1 : 0,
workers: IS_CI ? 2 : undefined,
timeout: 45_000,
expect: { timeout: 10_000 },
reporter: [
['list'],
['html', { outputFolder: 'playwright-report', open: 'never' }],
['junit', { outputFile: 'test-results/junit.xml' }],
],
use: {
baseURL: BASE_URL,
navigationTimeout: 30_000,
actionTimeout: 10_000,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
ignoreHTTPSErrors: true, // certificats internes VPS tolérés
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
// Majorité des acheteurs sur mobile (spec CHOISIR_MON_UNITE).
{ name: 'mobile-safari', use: { ...devices['iPhone 14'] } },
],
});