Files
bitvid/playwright.config.ts
T
google-labs-jules[bot]andPR0M3TH3AN 6d207d1094 feat(telemetry): add Playwright and smoke test aggregation
- Updated `playwright.config.ts` to output JSON test results to `artifacts/test-results/results.json`.
- Enhanced `scripts/agent/telemetry-aggregator.mjs` to ingest Playwright JSON reports, mapping failures to the unified error schema with PII sanitization.
- Updated aggregator to detect smoke test failures via `success: false` property.
- Verified aggregation flow by capturing a simulated Playwright failure.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-29 06:34:08 +00:00

41 lines
1.2 KiB
TypeScript

import { defineConfig } from "@playwright/test";
const HOST = process.env.PLAYWRIGHT_HOST ?? "127.0.0.1";
const PORT = Number.parseInt(process.env.PLAYWRIGHT_PORT ?? "4173", 10);
const BASE_URL = process.env.PLAYWRIGHT_BASE_URL ?? `http://${HOST}:${PORT}`;
export default defineConfig({
testDir: "./tests",
outputDir: "artifacts/test-results",
timeout: 60_000,
reporter: process.env.CI
? [["github"], ["html", { open: "never" }], ["json", { outputFile: "artifacts/test-results/results.json" }]]
: [["list"], ["html", { open: "never" }], ["json", { outputFile: "artifacts/test-results/results.json" }]],
use: {
baseURL: BASE_URL,
viewport: { width: 1280, height: 720 },
ignoreHTTPSErrors: true,
},
projects: [
{
name: "visual",
testMatch: "visual/**/*.spec.ts",
use: {
screenshot: "only-on-failure",
trace: "retain-on-failure",
video: "retain-on-failure",
},
},
{
name: "e2e",
testMatch: "e2e/**/*.spec.ts",
},
],
webServer: {
command: `npx http-server . -p ${PORT} -a ${HOST} -c-1 --silent`,
url: `${BASE_URL}/docs/kitchen-sink.html`,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});