2025-01-22 09:57:59 +00:00
|
|
|
import { defineConfig } from 'cypress';
|
2025-02-06 08:15:13 +00:00
|
|
|
// import vitePreprocessor from 'cypress-vite';
|
2024-11-24 15:41:21 +00:00
|
|
|
// https://docs.cypress.io/app/tooling/reporters
|
|
|
|
// https://docs.cypress.io/app/references/configuration
|
|
|
|
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
2022-12-20 13:59:53 +00:00
|
|
|
|
2025-01-22 09:57:59 +00:00
|
|
|
export default defineConfig({
|
2022-12-21 08:19:29 +00:00
|
|
|
e2e: {
|
2025-01-31 11:30:23 +00:00
|
|
|
baseUrl: 'http://127.0.0.1:9000/',
|
2025-02-03 08:13:18 +00:00
|
|
|
experimentalStudio: false, // Desactivado para evitar tiempos de espera innecesarios
|
|
|
|
defaultCommandTimeout: 10000,
|
|
|
|
requestTimeout: 10000,
|
|
|
|
responseTimeout: 30000,
|
|
|
|
pageLoadTimeout: 60000,
|
2023-01-03 13:17:22 +00:00
|
|
|
fixturesFolder: 'test/cypress/fixtures',
|
|
|
|
screenshotsFolder: 'test/cypress/screenshots',
|
|
|
|
supportFile: 'test/cypress/support/index.js',
|
|
|
|
videosFolder: 'test/cypress/videos',
|
2025-01-08 06:35:08 +00:00
|
|
|
downloadsFolder: 'test/cypress/downloads',
|
2023-09-25 10:06:49 +00:00
|
|
|
video: false,
|
2025-02-05 14:03:19 +00:00
|
|
|
specPattern: [
|
2025-02-06 08:15:13 +00:00
|
|
|
// 'test/cypress/integration/entry/stockBought.spec.js',
|
|
|
|
// 'test/cypress/integration/invoiceOut/invoiceOutNegativeBases.js',
|
|
|
|
// 'test/cypress/integration/invoiceOut/invoiceOutMakeInvoice.spec.js',
|
2025-02-05 14:03:19 +00:00
|
|
|
'test/cypress/integration/item/itemTag.spec.js',
|
2025-02-06 08:15:13 +00:00
|
|
|
// 'test/cypress/integration/route/routeList.spec.js',
|
|
|
|
// 'test/cypress/integration/ticket/ticketList.spec.js',
|
|
|
|
// 'test/cypress/integration/ticket/ticketSale.spec.js',
|
|
|
|
// 'test/cypress/integration/vnComponent/UserPanel.spec.js',
|
|
|
|
// 'test/cypress/integration/vnComponent/VnLocation.spec.js',
|
|
|
|
// 'test/cypress/integration/worker/workerNotificationsManager.spec.js',
|
2025-02-05 14:03:19 +00:00
|
|
|
],
|
2023-01-03 13:17:22 +00:00
|
|
|
experimentalRunAllSpecs: true,
|
2024-10-29 13:25:34 +00:00
|
|
|
watchForFileChanges: true,
|
2024-10-29 13:27:24 +00:00
|
|
|
reporter: 'cypress-mochawesome-reporter',
|
|
|
|
reporterOptions: {
|
|
|
|
charts: true,
|
|
|
|
reportPageTitle: 'Cypress Inline Reporter',
|
2024-11-24 15:41:21 +00:00
|
|
|
reportFilename: '[status]_[datetime]-report',
|
2024-10-29 13:27:24 +00:00
|
|
|
embeddedScreenshots: true,
|
|
|
|
reportDir: 'test/cypress/reports',
|
|
|
|
inlineAssets: true,
|
|
|
|
},
|
2022-12-21 08:19:29 +00:00
|
|
|
component: {
|
|
|
|
componentFolder: 'src',
|
|
|
|
testFiles: '**/*.spec.js',
|
2023-01-03 13:17:22 +00:00
|
|
|
supportFile: 'test/cypress/support/unit.js',
|
2022-12-21 08:19:29 +00:00
|
|
|
},
|
2025-01-29 06:35:04 +00:00
|
|
|
setupNodeEvents: async (on, config) => {
|
2025-02-06 08:15:13 +00:00
|
|
|
// on('file:preprocessor', vitePreprocessor());
|
2025-01-29 06:35:04 +00:00
|
|
|
const plugin = await import('cypress-mochawesome-reporter/plugin');
|
|
|
|
plugin.default(on);
|
|
|
|
return config;
|
2022-12-21 08:19:29 +00:00
|
|
|
},
|
2025-01-21 09:48:04 +00:00
|
|
|
viewportWidth: 1280,
|
|
|
|
viewportHeight: 720,
|
2022-12-20 13:59:53 +00:00
|
|
|
},
|
2025-02-05 06:15:10 +00:00
|
|
|
experimentalMemoryManagement: true,
|
|
|
|
defaultCommandTimeout: 10000,
|
|
|
|
numTestsKeptInMemory: 1000,
|
2022-12-20 13:59:53 +00:00
|
|
|
});
|