mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
move cypress config to cypress.config.js
This commit is contained in:
parent
d87561f715
commit
2a1b49a5dd
47
cypress/cypress.config.js
Normal file
47
cypress/cypress.config.js
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
const { defineConfig } = require("cypress");
|
||||||
|
const browserify = require("@badeball/cypress-cucumber-preprocessor/browserify");
|
||||||
|
const { addCucumberPreprocessorPlugin } = require("@badeball/cypress-cucumber-preprocessor");
|
||||||
|
|
||||||
|
// Test persistent(between commands) store
|
||||||
|
const testStore = {}
|
||||||
|
|
||||||
|
async function setupNodeEvents(on, config) {
|
||||||
|
await addCucumberPreprocessorPlugin(on, config);
|
||||||
|
|
||||||
|
on("file:preprocessor", browserify.default(config));
|
||||||
|
|
||||||
|
on("task", {
|
||||||
|
pushValue({ name, value }) {
|
||||||
|
testStore[name] = value
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
getValue(name) {
|
||||||
|
console.log("getValue",name,testStore)
|
||||||
|
return testStore[name]
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
on("after:run", (results) => {
|
||||||
|
if (results) {
|
||||||
|
console.log(results.status);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = defineConfig({
|
||||||
|
e2e: {
|
||||||
|
projectId: "qa7fe2",
|
||||||
|
chromeWebSecurity: false,
|
||||||
|
baseUrl: "http://localhost:3000",
|
||||||
|
specPattern: "cypress/e2e/**/*.feature",
|
||||||
|
supportFile: "cypress/support/e2e.js",
|
||||||
|
retries: {
|
||||||
|
runMode: 2,
|
||||||
|
openMode: 0,
|
||||||
|
},
|
||||||
|
video: false,
|
||||||
|
setupNodeEvents,
|
||||||
|
},
|
||||||
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user