molecule-core/canvas/playwright.config.ts
fullstack-engineer ab99ea54ad
Some checks failed
Block internal-flavored paths / Block forbidden paths (pull_request) Waiting to run
E2E API Smoke Test / detect-changes (pull_request) Waiting to run
E2E API Smoke Test / E2E API Smoke Test (pull_request) Blocked by required conditions
E2E Chat / detect-changes (pull_request) Waiting to run
E2E Chat / E2E Chat (pull_request) Blocked by required conditions
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Waiting to run
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Blocked by required conditions
E2E Staging External Runtime / E2E Staging External Runtime (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / pr-validate (pull_request) Waiting to run
E2E Staging SaaS (full lifecycle) / E2E Staging SaaS (pull_request) Waiting to run
Handlers Postgres Integration / detect-changes (pull_request) Waiting to run
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Blocked by required conditions
Harness Replays / detect-changes (pull_request) Waiting to run
Harness Replays / Harness Replays (pull_request) Blocked by required conditions
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Waiting to run
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Waiting to run
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Waiting to run
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Waiting to run
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Waiting to run
lint-required-no-paths / lint-required-no-paths (pull_request) Waiting to run
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Waiting to run
publish-runtime-autobump / pr-validate (pull_request) Waiting to run
publish-runtime-autobump / bump-and-tag (pull_request) Waiting to run
Runtime PR-Built Compatibility / detect-changes (pull_request) Waiting to run
Runtime PR-Built Compatibility / PR-built wheel + import smoke (pull_request) Blocked by required conditions
Secret scan / Scan diff for credential-shaped strings (pull_request) Waiting to run
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Waiting to run
gate-check-v3 / gate-check (pull_request) Waiting to run
security-review / approved (pull_request) Waiting to run
sop-checklist / all-items-acked (pull_request) Waiting to run
CI / Shellcheck (E2E scripts) (pull_request) Successful in 59s
CI / Detect changes (pull_request) Successful in 2m15s
sop-tier-check / tier-check (pull_request) Successful in 54s
CI / Python Lint & Test (pull_request) Successful in 9m1s
CI / Canvas Deploy Reminder (pull_request) Has been cancelled
CI / Platform (Go) (pull_request) Has been cancelled
CI / all-required (pull_request) Has been cancelled
CI / Canvas (Next.js) (pull_request) Successful in 23m29s
fix(e2e-chat): dynamic canvas port to avoid conflict with Gitea :3000
The operator host runs Gitea on 127.0.0.1:3000. With act_runner using
container.network: host, the E2E Chat job's Next.js dev server (also
port 3000) collides and crashes with EADDRINUSE.

Changes:
- Pick an ephemeral host port for the canvas dev server (same pattern
  already used for the platform port).
- Pass the port to next dev via -p flag (overrides package.json -p 3000).
- Update the health-check loop to probe the dynamic port.
- Export PLAYWRIGHT_BASE_URL so Playwright tests connect to the right URL.
- Make playwright.config.ts read baseURL from PLAYWRIGHT_BASE_URL env var
  with fallback to localhost:3000 (preserves local dev workflow).

This is an infrastructure compatibility fix, not a test logic change.
2026-05-15 17:14:40 -07:00

19 lines
427 B
TypeScript

import { defineConfig } from "@playwright/test";
export default defineConfig({
testDir: "./e2e",
timeout: 30_000,
expect: { timeout: 10_000 },
fullyParallel: false,
workers: 1,
retries: 0,
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://localhost:3000",
headless: true,
screenshot: "only-on-failure",
},
projects: [
{ name: "chromium", use: { browserName: "chromium" } },
],
});