Skip to content

Commit

Permalink
Ignore common on-reload xhr errors in Cypress.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jul 20, 2023
1 parent 7dd7166 commit 534c875
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,14 @@ Cypress.Commands.add('iframe', { prevSubject: 'element' }, ($iframe, callback =
.should((iframe) => expect(iframe.contents().find('body')).to.exist)
.then((iframe) => cy.wrap(iframe.contents().find('body')))
.within({}, callback));

Cypress.on('uncaught:exception', (err, runnable) => {
if (err.hasOwnProperty('request')) {
const u = err.request.url;
if (u.includes('config') || u.includes('settings') || u.includes('events')) {
return false;
}
}

return true;
});

0 comments on commit 534c875

Please sign in to comment.