- Add node_modules/, test-results/, e2e-report/, .omp/ to .gitignore - Remove throwaway debug scripts (debug-pw*.js, debug-login-dom.js) - Remove empty mock-server/ directory - Untrack harness artifact (.omp/plans/) - Add missing project files to git (e2e tests, Dockerfiles, tooling configs)
67 lines
2.0 KiB
TOML
67 lines
2.0 KiB
TOML
[tools]
|
|
node = "22.17.0"
|
|
|
|
[tasks.setup]
|
|
description = "Install Node deps and Playwright browsers"
|
|
run = """
|
|
if [ ! -d node_modules ]; then npm install; fi
|
|
npx playwright install chromium
|
|
"""
|
|
|
|
[tasks."docker:build"]
|
|
description = "Build OpenWRT LuCI image with podman (seccomp bypass for apk)"
|
|
run = "podman build --security-opt seccomp=unconfined -t zt-gateway-luci:dev -f Dockerfile.openwrt ."
|
|
[tasks."docker:up"]
|
|
description = "Build image + start the full test stack (router + ZT gateways + LuCI)"
|
|
depends = ["docker:build"]
|
|
run = "docker compose up -d"
|
|
|
|
[tasks."docker:down"]
|
|
description = "Stop the test stack"
|
|
run = "docker compose down"
|
|
|
|
[tasks."docker:logs"]
|
|
description = "View OpenWRT LuCI container logs"
|
|
run = "docker compose logs -f openwrt-luci"
|
|
|
|
[tasks."docker:shell"]
|
|
description = "Open shell in the OpenWRT LuCI container"
|
|
run = "docker compose exec openwrt-luci sh"
|
|
|
|
[tasks."test:e2e"]
|
|
description = "Run Playwright E2E tests (assumes stack is up)"
|
|
depends = ["setup"]
|
|
run = "npx playwright test"
|
|
|
|
[tasks."test:e2e:ui"]
|
|
description = "Run Playwright tests in interactive UI mode"
|
|
depends = ["setup"]
|
|
run = "npx playwright test --ui"
|
|
|
|
[tasks."test:e2e:headed"]
|
|
description = "Run Playwright tests in headed (visible) browser"
|
|
depends = ["setup"]
|
|
run = "npx playwright test --headed"
|
|
|
|
[tasks."test:e2e:debug"]
|
|
description = "Run Playwright tests in debug mode"
|
|
depends = ["setup"]
|
|
run = "npx playwright test --debug"
|
|
|
|
[tasks."inspect"]
|
|
description = "Start stack and open headed browser for manual inspection"
|
|
depends = ["docker:up"]
|
|
run = "npx playwright open chromium http://localhost:8080/cgi-bin/luci/admin/services/zt-gateway"
|
|
|
|
[tasks."reset"]
|
|
description = "Reset gateway state to amsterdam (default) via docker exec"
|
|
run = """
|
|
docker exec openwrt-luci /usr/sbin/zt-gateway-switch 10.99.12.3 force
|
|
docker exec openwrt-luci sh -c "uci set zt-gateway.global.active_gateway=amsterdam && uci commit zt-gateway" || true
|
|
"""
|
|
|
|
[tasks.ci]
|
|
description = "Full CI: build stack + install browsers + run E2E"
|
|
depends = ["docker:up", "setup"]
|
|
run = "npx playwright test"
|