// Playwright config for the rendered-browser E2E layer. This complements the // headless Rust protocol E2E in `crates/web_tests/tests/e2e.rs`: here a real // Chromium drives the actual DOM client. It boots the real server (short turns) // via `webServer` so `npm test` is self-contained. // // Requires Node + `npx playwright install chromium`. The Rust CI gates do not // depend on this; it is the optional rendered-browser proof. const { defineConfig } = require("@playwright/test"); module.exports = defineConfig({ testDir: "./specs", timeout: 30000, expect: { timeout: 10000 }, use: { baseURL: "http://127.0.0.1:8099", headless: true, }, webServer: { // Build once, then run the server with fast turns for E2E. command: "cargo run --release -p server --bin magicka-server", cwd: "../../..", env: { MAGICKA_ADDR: "127.0.0.1:8099", MAGICKA_TURN_MS: "1500" }, url: "http://127.0.0.1:8099/", reuseExistingServer: true, timeout: 120000, }, });