You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 regels
1.0 KiB

  1. import { defineConfig } from '@playwright/test';
  2. import path from 'node:path';
  3. import { cnBaseURL, playwrightArtifactRoot } from './e2e/fixtures/cluster';
  4. const chromiumExecutablePath = process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH;
  5. export default defineConfig({
  6. testDir: './e2e',
  7. testMatch: ['**/*.spec.ts', '**/*.spec.js'],
  8. fullyParallel: false,
  9. workers: 1,
  10. timeout: 60_000,
  11. expect: {
  12. timeout: 15_000,
  13. },
  14. outputDir: path.join(playwrightArtifactRoot, 'test-output'),
  15. reporter: [
  16. ['list'],
  17. [
  18. 'html',
  19. {
  20. outputFolder: path.join(playwrightArtifactRoot, 'html-report'),
  21. open: 'never',
  22. },
  23. ],
  24. ],
  25. globalSetup: './e2e/global-setup.ts',
  26. globalTeardown: './e2e/global-teardown.ts',
  27. use: {
  28. baseURL: cnBaseURL,
  29. headless: true,
  30. launchOptions: chromiumExecutablePath
  31. ? {
  32. executablePath: chromiumExecutablePath,
  33. }
  34. : undefined,
  35. screenshot: 'only-on-failure',
  36. trace: 'retain-on-failure',
  37. video: 'retain-on-failure',
  38. },
  39. });