playwright.config.js 715 B

1234567891011121314151617181920212223242526
  1. import { existsSync } from "node:fs";
  2. import { defineConfig } from "@playwright/test";
  3. const localChrome =
  4. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
  5. export default defineConfig({
  6. testDir: "./tests",
  7. timeout: 30000,
  8. fullyParallel: true,
  9. use: {
  10. baseURL: "http://127.0.0.1:8081",
  11. headless: true,
  12. launchOptions: {
  13. executablePath:
  14. process.env.FRONTEND_CHROME_BIN ||
  15. (existsSync(localChrome) ? localChrome : undefined),
  16. },
  17. },
  18. webServer: {
  19. command: "../.venv/bin/python ../scripts/check_frontend.py",
  20. url: "http://127.0.0.1:8081",
  21. reuseExistingServer: false,
  22. timeout: 15000,
  23. },
  24. outputDir: "../.tmp/frontend_browser_tests",
  25. });