Skip to content

Commit aa18972

Browse files
committed
E2E: Ignore "uncaught:exception" to prevent test from failing.
1 parent 5be4460 commit aa18972

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/cypress/support/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@
1616
import '@10up/cypress-wp-utils';
1717
import './commands';
1818

19+
Cypress.on('uncaught:exception', (err, runnable) => {
20+
/*
21+
* Noticed this "Transition was skipped" error on WP 7.0
22+
*/
23+
if (err.message.includes('Transition was skipped')) {
24+
// returning false here prevents Cypress from failing the test
25+
return false;
26+
}
27+
28+
return runnable;
29+
});
30+
1931
// TODO: Initialize tests from a blank state
2032
// TODO: Wipe WP data related to a users options
2133
// TODO: Delete all contacts in a users Mailchimp account

0 commit comments

Comments
 (0)