Spaces:
Running
Running
File size: 1,045 Bytes
1ecac33 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | import { defineConfig } from "@playwright/test";
// E2E smoke test drives the REAL stack: one uvicorn process serves both the API
// and the built frontend (same-origin /api). The frontend must be built first
// (`npm run build`) so space_app can serve frontend/dist.
const PORT = 7860;
export default defineConfig({
testDir: "./e2e",
timeout: 60_000,
fullyParallel: false,
reporter: [["list"]],
use: {
baseURL: `http://127.0.0.1:${PORT}`,
headless: true,
},
webServer: {
command: `bash -c "cd .. && uvicorn space_app.main:app --host 127.0.0.1 --port ${PORT}"`,
url: `http://127.0.0.1:${PORT}/api/puzzles?puzzle_type=bridges&difficulty=medium`,
timeout: 180_000,
reuseExistingServer: true,
env: {
// Keep the e2e run off the real /data dir; reuse the existing HF dataset cache.
TOPOBENCH_DATA_DIR: "/tmp/topobench_e2e",
HF_HOME: `${process.env.HOME}/.cache/huggingface`,
SDL_AUDIODRIVER: "dummy",
SDL_VIDEODRIVER: "dummy",
PYTHONWARNINGS: "ignore",
},
},
});
|