From 8d42736091bf59238b7ebb2acd5b94c224ed577c Mon Sep 17 00:00:00 2001 From: sksaju Date: Thu, 7 Nov 2024 02:33:06 +0600 Subject: [PATCH] update cypress config --- tests/cypress/cypress.config.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/cypress/cypress.config.js b/tests/cypress/cypress.config.js index 67ba915..bafa2a5 100644 --- a/tests/cypress/cypress.config.js +++ b/tests/cypress/cypress.config.js @@ -1,18 +1,23 @@ const { defineConfig } = require('cypress'); +const path = require('path'); module.exports = defineConfig({ chromeWebSecurity: false, - fixturesFolder: `${__dirname}/fixtures`, - screenshotsFolder: `${__dirname}/screenshots`, - videosFolder: `${__dirname}/videos`, - downloadsFolder: `${__dirname}/downloads`, - video: false, + fixturesFolder: 'tests/cypress/fixtures', + screenshotsFolder: 'tests/cypress/screenshots', + videosFolder: 'tests/cypress/videos', + downloadsFolder: 'tests/cypress/downloads', + video: true, + reporter: 'mochawesome', + reporterOptions: { + mochaFile: 'mochawesome-[name]', + reportDir: path.join(__dirname, 'reports'), + overwrite: false, + html: false, + json: true, + }, e2e: { - setupNodeEvents(on, config) { - // eslint-disable-next-line import/no-dynamic-require, global-require - return require(`${__dirname}/plugins/index.js`)(on, config); - }, - specPattern: `${__dirname}/e2e/*.test.{js,jsx,ts,tsx}`, - supportFile: `${__dirname}/support/index.js`, + specPattern: 'tests/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', + supportFile: 'tests/cypress/support/index.js', }, });