Skip to content

Commit

Permalink
test: simplify the env logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MekalaNagarajan-Centrica committed Aug 9, 2024
1 parent 2677fdd commit ce58fba
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
const { defineConfig } = require('cypress')
const { defineConfig } = require('cypress');
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor");
const preprocessor = require("@badeball/cypress-cucumber-preprocessor");
const createEsbuildPlugin = require("@badeball/cypress-cucumber-preprocessor/esbuild");
const { allureCypress } = require("allure-cypress/reporter");
const data = require("./config/base-config.json");

module.exports = defineConfig({
e2e: {
async setupNodeEvents(on, config){
async setupNodeEvents(on, config) {
await preprocessor.addCucumberPreprocessorPlugin(on, config);
on('file:preprocessor',
createBundler({
plugins: [createEsbuildPlugin.default(config)],
})
)
on('file:preprocessor',
createBundler({
plugins: [createEsbuildPlugin.default(config)]
})
);
allureCypress(on, {
resultsDir: "./allure-results",
resultsDir: "./allure-results"
});
return config;
},
env : {
tags: data.env.tags,
env: {
tags: '@card or @cta or @detail or @form or @image or @icon or @inputter or @cake'
},
includeShadowDom: true,
experimentalRunAllSpecs : true,
experimentalRunAllSpecs: true,
supportFile: 'cypress/support/e2e.js',
specPattern: ['cypress/e2e/component_tests/*.feature','cypress/e2e/example_app_tests/*.feature'],
specPattern: ['cypress/e2e/component_tests/*.feature', 'cypress/e2e/example_app_tests/*.feature'],
},
})
})

0 comments on commit ce58fba

Please sign in to comment.