playwright.config.ts 837 B

12345678910111213141516171819202122232425262728
  1. import { PlaywrightTestConfig } from '@playwright/test'
  2. const config: PlaywrightTestConfig = {
  3. // The directory where the tests are located
  4. // The order of the tests is determined by the file names alphabetically.
  5. testDir: './e2e-tests',
  6. // The number of retries before marking a test as failed.
  7. maxFailures: 1,
  8. // The number of Logseq instances to run in parallel.
  9. // NOTE: must be 1 for now, otherwise tests will fail.
  10. workers: 1,
  11. // 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot'.
  12. // default 'list' when running locally.
  13. reporter: process.env.CI ? 'github' : 'list',
  14. // Fail the build on CI if test.only is present.
  15. forbidOnly: !!process.env.CI,
  16. use: {
  17. // SCapture screenshot after each test failure.
  18. screenshot: 'only-on-failure',
  19. },
  20. }
  21. export default config