playwright.config.ts 953 B

123456789101112131415161718192021222324252627282930313233
  1. import { defineConfig, devices } from '@playwright/test';
  2. import path from 'node:path';
  3. import { fileURLToPath } from 'node:url';
  4. const __dirname = path.dirname(fileURLToPath(import.meta.url));
  5. const BASE_URL = process.env.AIDOP_E2E_BASE_URL ?? 'http://localhost:8888';
  6. const STORAGE_STATE = path.resolve(__dirname, 'tests/e2e/.auth/storage-state.json');
  7. export default defineConfig({
  8. testDir: './tests/e2e',
  9. testIgnore: ['**/.auth/**', '**/fixtures/**'],
  10. timeout: 120_000,
  11. expect: { timeout: 15_000 },
  12. fullyParallel: false,
  13. workers: 1,
  14. reporter: [['list']],
  15. globalSetup: './tests/e2e/global-setup.ts',
  16. use: {
  17. baseURL: BASE_URL,
  18. storageState: STORAGE_STATE,
  19. trace: 'retain-on-failure',
  20. screenshot: 'only-on-failure',
  21. video: 'retain-on-failure',
  22. navigationTimeout: 60_000,
  23. actionTimeout: 15_000,
  24. },
  25. projects: [
  26. {
  27. name: 'chromium',
  28. use: { ...devices['Desktop Chrome'] },
  29. },
  30. ],
  31. });