Files
overleaf-cep/services/web/cypress.config.ts
Anna Claire Fields 0d64a88a46 Yarn 4 Migration (#32253)
Migrates the Overleaf monorepo package manager from npm (v11) to Yarn 4 (v4.9.1) using node-modules linker mode.

GitOrigin-RevId: 50d32ab01955c15e29679eff9e9e9cfb897fab2d
2026-04-28 08:52:37 +00:00

41 lines
1.1 KiB
TypeScript

import { defineConfig } from 'cypress'
import { webpackConfig } from './cypress/support/webpack.cypress'
let reporterOptions = {}
if (process.env.CI) {
reporterOptions = {
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'cypress/cypress-multi-reporters.json',
},
}
}
export default defineConfig({
fixturesFolder: 'cypress/fixtures',
video: process.env.CYPRESS_VIDEO === 'true',
downloadsFolder: process.env.CYPRESS_DOWNLOADS || 'cypress/downloads',
screenshotsFolder: process.env.CYPRESS_RESULTS || 'cypress/results',
videosFolder: process.env.CYPRESS_RESULTS || 'cypress/results',
viewportHeight: 800,
viewportWidth: 800,
component: {
devServer: {
framework: 'react',
bundler: 'webpack',
webpackConfig,
},
setupNodeEvents(on, config) {
//
},
specPattern:
process.env.CYPRESS_SPEC_PATTERN ||
'./{test,modules/**/test}/frontend/**/*.spec.{js,jsx,ts,tsx}',
excludeSpecPattern: process.env.CYPRESS_EXCLUDE_SPEC_PATTERN,
},
retries: {
runMode: parseInt(process.env.CYPRESS_RETRIES || '3', 10) || 3,
},
...reporterOptions,
})