cypress.config.js 697 B

12345678910111213141516171819202122232425262728
  1. const { defineConfig } = require('cypress')
  2. const { readPdf, readFileInZip } = require('./helpers/read-file')
  3. const specPattern = process.env.SPEC_PATTERN || './**/*.spec.{js,ts,tsx}'
  4. module.exports = defineConfig({
  5. defaultCommandTimeout: 10_000,
  6. fixturesFolder: 'cypress/fixtures',
  7. video: process.env.CYPRESS_VIDEO === 'true',
  8. screenshotsFolder: 'cypress/results',
  9. videosFolder: 'cypress/results',
  10. videoUploadOnPasses: false,
  11. viewportHeight: 768,
  12. viewportWidth: 1024,
  13. e2e: {
  14. baseUrl: 'http://localhost',
  15. setupNodeEvents(on, config) {
  16. on('task', {
  17. readPdf,
  18. readFileInZip,
  19. })
  20. },
  21. specPattern,
  22. },
  23. retries: {
  24. runMode: 1,
  25. },
  26. })