Skip to content

Commit 15a7ed5

Browse files
authored
fix test-recipes script where error is throwing on www.cpyress.io (#892)
1 parent 0a7dda1 commit 15a7ed5

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

examples/server-communication__visit-2nd-domain/cypress/e2e/using-file-spec.cy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ describe('Two domains using file', () => {
55
Cypress.on('uncaught:exception', (err) => {
66
// cypress.io has a few React exceptions related to state hydration,
77
// but these exceptions do not impact this test
8-
if (err.message.includes('Minified React error')) {
8+
// This is also true with Cannot read properties of null (reading 'addEventListener') which has to due with the osano library
9+
// that is on www.cypress.io
10+
if (err.message.includes('Minified React error') || err.message.includes(`Cannot read properties of null (reading 'addEventListener')`)) {
911
return false
1012
}
1113

examples/server-communication__visit-2nd-domain/cypress/e2e/using-task-spec.cy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ describe('Two domains', () => {
33
Cypress.on('uncaught:exception', (err) => {
44
// cypress.io has a few React exceptions related to state hydration,
55
// but these exceptions do not impact this test
6-
if (err.message.includes('Minified React error')) {
6+
// This is also true with Cannot read properties of null (reading 'addEventListener') which has to due with the osano library
7+
// that is on www.cypress.io
8+
if (err.message.includes('Minified React error') || err.message.includes(`Cannot read properties of null (reading 'addEventListener')`)) {
79
return false
810
}
911

examples/testing-dom__page-source/cypress/e2e/spec.cy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ describe('Page source', () => {
44
Cypress.on('uncaught:exception', (err) => {
55
// cypress.io has a few React exceptions related to state hydration,
66
// but these exceptions do not impact this test
7-
if (err.message.includes('Minified React error')) {
7+
// This is also true with Cannot read properties of null (reading 'addEventListener') which has to due with the osano library
8+
// that is on www.cypress.io
9+
if (err.message.includes('Minified React error') || err.message.includes(`Cannot read properties of null (reading 'addEventListener')`)) {
810
return false
911
}
1012

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
"x2js": "3.4.1"
161161
},
162162
"engines": {
163-
"node": "^18.16.0"
163+
"node": "^18.16.0 || ^20.11.1"
164164
},
165165
"license": "MIT",
166166
"repository": {

0 commit comments

Comments
 (0)