Merge branch 'master' into backend-dependency-update

This commit is contained in:
mahula 2024-10-30 10:00:19 +01:00 committed by GitHub
commit 47b479c878
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1358 additions and 497 deletions

View File

@ -1,7 +1,12 @@
const dotenv = require('dotenv') const dotenv = require('dotenv')
const { defineConfig } = require("cypress"); const { defineConfig } = require('cypress');
const browserify = require("@badeball/cypress-cucumber-preprocessor/browserify"); const browserify = require('@cypress/browserify-preprocessor');
const { addCucumberPreprocessorPlugin } = require("@badeball/cypress-cucumber-preprocessor"); const {
addCucumberPreprocessorPlugin,
} = require('@badeball/cypress-cucumber-preprocessor');
const {
preprendTransformerToOptions,
} = require('@badeball/cypress-cucumber-preprocessor/browserify');
// Test persistent(between commands) store // Test persistent(between commands) store
const testStore = {} const testStore = {}
@ -9,15 +14,18 @@ const testStore = {}
async function setupNodeEvents(on, config) { async function setupNodeEvents(on, config) {
await addCucumberPreprocessorPlugin(on, config); await addCucumberPreprocessorPlugin(on, config);
on("file:preprocessor", browserify.default(config)); on(
'file:preprocessor',
browserify(preprendTransformerToOptions(config, browserify.defaultOptions)),
);
on("task", { on('task', {
pushValue({ name, value }) { pushValue({ name, value }) {
testStore[name] = value testStore[name] = value
return true return true
}, },
getValue(name) { getValue(name) {
console.log("getValue",name,testStore) console.log('getValue',name,testStore)
return testStore[name] return testStore[name]
}, },
}); });
@ -30,13 +38,13 @@ const { parsed } = dotenv.config({ path: '../backend/.env' })
module.exports = defineConfig({ module.exports = defineConfig({
e2e: { e2e: {
projectId: "qa7fe2", projectId: 'qa7fe2',
defaultCommandTimeout: 60000, defaultCommandTimeout: 60000,
pageLoadTimeout:180000, pageLoadTimeout:180000,
chromeWebSecurity: false, chromeWebSecurity: false,
baseUrl: "http://localhost:3000", baseUrl: 'http://localhost:3000',
specPattern: "cypress/e2e/**/*.feature", specPattern: '**/*.feature',
supportFile: "cypress/support/e2e.js", supportFile: 'cypress/support/e2e.js',
retries: 0, retries: 0,
video: false, video: false,
viewportHeight: 720, viewportHeight: 720,

View File

@ -36,7 +36,7 @@
"@babel/core": "^7.26.0", "@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0", "@babel/preset-env": "^7.26.0",
"@babel/register": "^7.25.9", "@babel/register": "^7.25.9",
"@badeball/cypress-cucumber-preprocessor": "^20.0.4", "@badeball/cypress-cucumber-preprocessor": "^21.0.2",
"@cucumber/cucumber": "10.6.0", "@cucumber/cucumber": "10.6.0",
"@cypress/browserify-preprocessor": "^3.0.2", "@cypress/browserify-preprocessor": "^3.0.2",
"@faker-js/faker": "9.1.0", "@faker-js/faker": "9.1.0",

1825
yarn.lock

File diff suppressed because it is too large Load Diff