You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This command is run from localhost against the crossorigin aut. Updating href is one of the few allowed commands. See https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#location
212
+
// This command is run from localhost against the cross-origin aut. Updating href is one of the few allowed commands. See https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#location
expect(err.message).to.include(`Your page did not fire its \`load\` event within \`5000ms\`.`)
269
-
expect(err.message).to.include(`A cross origin request for \`http://www.foobar.com:3500/fixtures/auth/idp.html?redirect=http%3A%2F%2Flocalhost%3A3500%2Ffixtures%2Fauth%2Findex.html\` was detected.`)
270
-
expect(err.message).to.include(`A command that triggers cross origin navigation must be immediately followed by a \`cy.origin()\` command:`)
268
+
expect(err.message).to.include(`A cross-origin request for \`http://www.foobar.com:3500/fixtures/auth/idp.html?redirect=http%3A%2F%2Flocalhost%3A3500%2Ffixtures%2Fauth%2Findex.html\` was detected.`)
269
+
expect(err.message).to.include(`A command that triggers cross-origin navigation must be immediately followed by a \`cy.origin()\` command:`)
271
270
expect(err.message).to.include(`\`\ncy.origin(\'http://foobar.com:3500\', () => {\n <commands targeting http://www.foobar.com:3500 go here>\n})\n\``)
272
-
expect(err.message).to.include(`If the crossorigin request was an intermediary state, you can try increasing the \`pageLoadTimeout\` value in \`cypress.json\` to wait longer`)
271
+
expect(err.message).to.include(`If the cross-origin request was an intermediary state, you can try increasing the \`pageLoadTimeout\` value in \`cypress.json\` to wait longer`)
273
272
274
273
expect(err.message).not.to.include(`The following error originated from your test code, not from Cypress`)
275
274
expect(err.message).not.to.include(`The following error originated from your application code, not from Cypress`)
@@ -281,10 +280,11 @@ describe('errors', () => {
281
280
cy.get('[data-cy="login-foobar"]')
282
281
})
283
282
284
-
it('never redirects to the crossorigin',{defaultCommandTimeout: 50},(done)=>{
283
+
it('never redirects to the cross-origin',{defaultCommandTimeout: 50},(done)=>{
285
284
cy.on('fail',(err)=>{
286
285
expect(err.message).to.include(`Timed out retrying after 50ms: Expected to find element: \`[data-cy="username"]\`, but never found it`)
287
-
expect(err.message).to.include(`The command was expected to run against origin: \`http://idp.com:3500\` but the application is at origin: \`http://localhost:3500\`.`)
286
+
expect(err.message).to.include(`The command was expected to run against origin \`http://idp.com:3500\` but the application is at origin \`http://localhost:3500\`.`)
287
+
expect(err.message).to.include(`This commonly happens when you have either not navigated to the expected origin or have navigated away unexpectedly.`)
288
288
// make sure that the secondary origin failures do NOT show up as spec failures or AUT failures
289
289
expect(err.message).not.to.include(`The following error originated from your test code, not from Cypress`)
290
290
expect(err.message).not.to.include(`The following error originated from your application code, not from Cypress`)
@@ -303,11 +303,11 @@ describe('errors', () => {
303
303
.should('equal','Welcome BJohnson')
304
304
})
305
305
306
-
it('redirects to the wrong crossorigin',{pageLoadTimeout: 5000},(done)=>{
306
+
it('redirects to the wrong cross-origin',{pageLoadTimeout: 5000},(done)=>{
307
307
cy.on('fail',(err)=>{
308
308
expect(err.message).to.include(`Timed out after waiting \`5000ms\` for your remote page to load on origin(s):`)
expect(err.message).to.include(`A crossorigin request for \`http://www.foobar.com:3500/fixtures/auth/idp.html?redirect=http%3A%2F%2Flocalhost%3A3500%2Ffixtures%2Fauth%2Findex.html\` was detected.`)
310
+
expect(err.message).to.include(`A cross-origin request for \`http://www.foobar.com:3500/fixtures/auth/idp.html?redirect=http%3A%2F%2Flocalhost%3A3500%2Ffixtures%2Fauth%2Findex.html\` was detected.`)
311
311
expect(err.message).to.include(`\`\ncy.origin(\'http://foobar.com:3500\', () => {\n <commands targeting http://www.foobar.com:3500 go here>\n})\n\``)
312
312
313
313
expect(err.message).not.to.include(`The following error originated from your test code, not from Cypress`)
@@ -331,7 +331,7 @@ describe('errors', () => {
331
331
it('never returns to the primary origin',{defaultCommandTimeout: 50},(done)=>{
332
332
cy.on('fail',(err)=>{
333
333
expect(err.message).to.include(`Timed out retrying after 50ms: Expected to find element: \`[data-cy="welcome"]\`, but never found it`)
334
-
expect(err.message).to.include(`The command was expected to run against origin: \`http://localhost:3500\` but the application is at origin: \`http://idp.com:3500\`.`)
334
+
expect(err.message).to.include(`The command was expected to run against origin \`http://localhost:3500\` but the application is at origin \`http://idp.com:3500\`.`)
335
335
// make sure that the secondary origin failures do NOT show up as spec failures or AUT failures
336
336
expect(err.message).not.to.include(`The following error originated from your test code, not from Cypress`)
337
337
expect(err.message).not.to.include(`The following error originated from your application code, not from Cypress`)
@@ -350,11 +350,11 @@ describe('errors', () => {
350
350
.should('equal','Welcome BJohnson')
351
351
})
352
352
353
-
it('redirects to an unexpected crossorigin',{pageLoadTimeout: 5000},(done)=>{
353
+
it('redirects to an unexpected cross-origin',{pageLoadTimeout: 5000},(done)=>{
354
354
cy.on('fail',(err)=>{
355
355
expect(err.message).to.include(`Timed out after waiting \`5000ms\` for your remote page to load on origin(s):`)
expect(err.message).to.include(`A crossorigin request for \`http://www.foobar.com:3500/fixtures/auth/index.html\` was detected.`)
384
+
expect(err.message).to.include(`A cross-origin request for \`http://www.foobar.com:3500/fixtures/auth/index.html\` was detected.`)
385
385
expect(err.message).to.include(`\`\ncy.origin(\'http://foobar.com:3500\', () => {\n <commands targeting http://www.foobar.com:3500 go here>\n})\n\``)
386
386
387
387
expect(err.message).not.to.include(`The following error originated from your test code, not from Cypress`)
@@ -409,7 +409,7 @@ describe('errors', () => {
409
409
it('fails in cy.origin when a command is run after we return to localhost',{defaultCommandTimeout: 50},(done)=>{
410
410
cy.on('fail',(err)=>{
411
411
expect(err.message).to.include(`Timed out retrying after 50ms: Expected to find element: \`[data-cy="cannot_find"]\`, but never found it`)
412
-
expect(err.message).to.include(`The command was expected to run against origin: \`http://idp.com:3500\` but the application is at origin: \`http://localhost:3500\`.`)
412
+
expect(err.message).to.include(`The command was expected to run against origin \`http://idp.com:3500\` but the application is at origin \`http://localhost:3500\`.`)
413
413
// make sure that the secondary origin failures do NOT show up as spec failures or AUT failures
414
414
expect(err.message).not.to.include(`The following error originated from your test code, not from Cypress`)
415
415
expect(err.message).not.to.include(`The following error originated from your application code, not from Cypress`)
@@ -454,7 +454,7 @@ describe('errors', () => {
454
454
cy.on('fail',(err)=>{
455
455
expect(err.message).to.include(`Timed out after waiting \`5000ms\` for your remote page to load on origin(s):`)
<commands targeting ${crossOriginUrl.origin} go here>
1008
+
})
1009
+
\`\`\`
1009
1010
1010
-
If the crossorigin request was an intermediary state, you can try increasing the \`pageLoadTimeout\` value in ${formatConfigFile(configFile)} to wait longer.
1011
+
If the cross-origin request was an intermediary state, you can try increasing the \`pageLoadTimeout\` value in ${formatConfigFile(configFile)} to wait longer.
1011
1012
1012
-
Browsers will not fire the \`load\` event until all stylesheets and scripts are done downloading.
1013
+
Browsers will not fire the \`load\` event until all stylesheets and scripts are done downloading.
1013
1014
1014
-
When this \`load\` event occurs, Cypress will continue running commands.`
1015
+
When this \`load\` event occurs, Cypress will continue running commands.`,
0 commit comments