Skip to content

Commit

Permalink
Temporarily handle uncaught exceptions related to hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
Onurcankaratay committed Oct 3, 2024
1 parent c221389 commit 9370121
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion deploy/post_deploy_testing/cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,18 @@
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
// require('./commands')

Cypress.on("uncaught:exception", (err) => {
// TODO: Investigate hydration errors occurring during SSR in Cypress tests.
// It appears that Cypress injects a prop into the div on the client side, which doesn't exist on the server side, leading to hydration issues.
// This suppression is temporary and should be removed once the issue is resolved.
// https://github.com/cypress-io/cypress/issues/27204
if (
/hydrat/i.test(err.message) ||
/Minified React error #418/.test(err.message) ||
/Minified React error #423/.test(err.message)
) {
return false;
}
});

0 comments on commit 9370121

Please sign in to comment.