package.cypress-configs.initializer.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
const { defineConfig } = require("cypress");
const defineCypressConfig = (overrides = {}) => {
const { e2e: e2eOverrides = {}, ...otherProps } = overrides;
return defineConfig({
execTimeout: 1800000,
defaultCommandTimeout: 12000,
requestTimeout: 15000,
pageLoadTimeout: 60000,
responseTimeout: 45000,
viewportWidth: 1440,
viewportHeight: 960,
chromeWebSecurity: false,
env: { grepFilterSpecs: true, grepOmitFiltered: true },
retries: { runMode: 1, openMode: 0 },
e2e: {
setupNodeEvents(on, config) {
return require("./plugins")(on, config);
},
specPattern: "cypress/e2e/**/*.spec.js",
excludeSpecPattern: ["cypress/e2e/**/*.wip.spec.js"],
experimentalRunAllSpecs: true,
testIsolation: true,
experimentalMemoryManagement: true,
...e2eOverrides,
},
...otherProps,
});
};
module.exports = { defineCypressConfig };