Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions cypress/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { defineConfig } from "cypress";
import webpack from "@cypress/webpack-preprocessor";
import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor";
import cypressOnFix from "cypress-on-fix";

async function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions
): Promise<Cypress.PluginConfigOptions> {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,

on = cypressOnFix(on);

await addCucumberPreprocessorPlugin(on, config);

on(
Expand Down Expand Up @@ -42,7 +45,6 @@ async function setupNodeEvents(
})
);

// Make sure to return the config object as it might have been modified by the plugin.
return config;
}

Expand All @@ -53,12 +55,14 @@ export default defineConfig({
setupNodeEvents,
defaultCommandTimeout: 10000,
pageLoadTimeout: 60000,
chromeWebSecurity: false,
experimentalModifyObstructiveThirdPartyCode: true,
},
includeShadowDom: true,
viewportHeight: 1080,
viewportWidth: 1920,
retries: {
runMode: 3,
runMode: 0,
openMode: 0,
},
});
12 changes: 9 additions & 3 deletions cypress/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Cypress.on('window:before:load', (win) => {
});

Cypress.on('uncaught:exception', (err, runnable) => {
console.log(err);
return false;
})
if (
err.name === 'DOMException' ||
err.message.includes('Cannot set property message of [object DOMException]')
) {
return false;
}

return true;
})
Loading
Loading