Files
OmniRoute/tests/homolog/ui/playwright.config.ts
Diego Rodrigues de Sa e Souza c97d2a6ae2 feat(homolog): real-environment E2E homologation suite (npm run homolog) (#7133)
* feat(homolog): scaffolding da suíte de homologação E2E (deps + npm run homolog)

* feat(homolog): L0 avaliador de paridade de deploy (TDD)

* feat(homolog): L1a ciclo de vida de API key efêmera (login admin -> create -> revoke)

* feat(homolog): L1b suite httpYac de API (models, chat, auth de management, health)

* feat(homolog): L1c checker SSE de streaming real (TDD no parser)

* feat(homolog): L2 smoke de providers reais via promptfoo gerado do catálogo

* feat(homolog): L4a Playwright homolog config + login storageState

* feat(homolog): L4b smoke de todas as rotas do dashboard (descoberta via fs)

* feat(homolog): L4c fluxo criar/revogar API key pela UI

* fix(homolog): resiliencia real-environment — stream:false no smoke promptfoo, retry de socket keep-alive, key efemera com sufixo unico

* feat(homolog): L5 orquestrador npm run homolog + relatorio CTRF unificado

* docs(homolog): guia de operacao da suite + fragment de changelog + allowlist env-doc-sync

* fix(homolog): paraleliza o sweep de rotas do dashboard (fullyParallel + 8 workers)

* fix(homolog): isola outputs crus em homolog-report/raw para nao quebrar o ctrf merge

* fix(homolog): outputDir absoluto do reporter CTRF da UI (path relativo escapava do worktree)

* chore(quality): allowlist the 5 homolog-suite devDependencies (ctrf-io trio, httpyac, promptfoo) after registry verification

* chore(quality): register the homolog Playwright suite as a test-discovery collector (run.mjs -> tests/homolog/ui)
2026-07-14 16:24:11 -03:00

43 lines
1.3 KiB
TypeScript

import { defineConfig } from "@playwright/test";
import path from "node:path";
import { fileURLToPath } from "node:url";
const HERE = path.dirname(fileURLToPath(import.meta.url));
export const STORAGE_STATE = path.join(HERE, ".auth", "admin.json");
export default defineConfig({
testDir: ".",
timeout: 60_000,
retries: 1,
// Sem fullyParallel, os 98 testes de routes.spec.ts (mesmo arquivo) rodam
// SERIALIZADOS num único worker (~10min); com ele, distribuem entre os workers.
fullyParallel: true,
workers: 8,
reporter: [
["list"],
[
// outputDir ABSOLUTO: o reporter resolve paths relativos contra o CWD do
// processo (não contra o config) — um path relativo escapava do worktree.
"playwright-ctrf-json-reporter",
{
outputDir: path.resolve(HERE, "..", "..", "..", "homolog-report"),
outputFile: "ui-ctrf.json",
},
],
],
use: {
baseURL: process.env.HOMOLOG_BASE_URL || "http://192.168.0.15:20128",
trace: "retain-on-failure",
screenshot: "only-on-failure",
},
projects: [
{ name: "setup", testMatch: /auth\.setup\.ts/ },
{
name: "homolog",
testMatch: /.*\.spec\.ts/,
dependencies: ["setup"],
use: { storageState: STORAGE_STATE },
},
],
});