all repos — snow-editor @ main

small and cozy markdown, and orgmode editor

playwright.config.js (view raw)

 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
 33
 34
 35
import { defineConfig } from '@playwright/test';

export default defineConfig({
  testDir: './e2e',
  timeout: 60_000,
  fullyParallel: false,
  retries: process.env.CI ? 2 : 0,
  reporter: process.env.CI ? 'github' : 'list',
  use: {
    baseURL: 'http://localhost:41737',
    trace: 'on-first-retry',
  },
  webServer: [
    {
      name: 'backend',
      command: 'node src/server.js',
      cwd: './backend',
      url: 'http://localhost:41738/api/health',
      reuseExistingServer: !process.env.CI,
      timeout: 30_000,
      env: {
        DATABASE_PATH: './.e2e/snow-e2e.db',
        SHARE_ALLOWED_ORIGINS:
          'http://localhost:41737,http://127.0.0.1:41737',
      },
    },
    {
      name: 'frontend',
      command: 'npm run dev',
      url: 'http://localhost:41737',
      reuseExistingServer: !process.env.CI,
      timeout: 60_000,
    },
  ],
});