import { defineConfig } from 'cypress'; // https://docs.cypress.io/app/tooling/reporters // https://docs.cypress.io/app/references/configuration // https://www.npmjs.com/package/cypress-mochawesome-reporter const baseUrl = `http://${process.env.DOCKER ? 'front' : 'localhost'}:9000`; export default defineConfig({ e2e: { baseUrl, experimentalStudio: false, // Desactivado para evitar tiempos de espera innecesarios defaultCommandTimeout: 10000, trashAssetsBeforeRuns: false, requestTimeout: 10000, responseTimeout: 30000, pageLoadTimeout: 60000, fixturesFolder: 'test/cypress/fixtures', screenshotsFolder: 'test/cypress/screenshots', supportFile: 'test/cypress/support/index.js', videosFolder: 'test/cypress/videos', downloadsFolder: 'test/cypress/downloads', video: false, specPattern: 'test/cypress/integration/**/*.spec.js', experimentalRunAllSpecs: true, watchForFileChanges: true, reporter: 'cypress-mochawesome-reporter', reporterOptions: { charts: true, reportPageTitle: 'Cypress Inline Reporter', reportFilename: '[status]_[datetime]-report', embeddedScreenshots: true, reportDir: 'test/cypress/reports', inlineAssets: true, }, component: { componentFolder: 'src', testFiles: '**/*.spec.js', supportFile: 'test/cypress/support/unit.js', }, setupNodeEvents: async (on, config) => { const plugin = await import('cypress-mochawesome-reporter/plugin'); plugin.default(on); return config; }, viewportWidth: 1280, viewportHeight: 720, }, experimentalMemoryManagement: true, defaultCommandTimeout: 10000, numTestsKeptInMemory: 2, });