Skip to content

Commit 7990696

Browse files
committed
Flex message for firefox
1 parent 2c98eb1 commit 7990696

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/driver/cypress/integration/commands/navigation_spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,10 +2184,12 @@ describe('src/cy/commands/navigation', () => {
21842184

21852185
expect(err.docsUrl).to.eq('https://on.cypress.io/origin')
21862186
} else {
2187+
const error = Cypress.isBrowser('firefox') ? 'Permission denied to access property "document" on cross-origin object' : 'Blocked a frame with origin "http://localhost:3500" from accessing a cross-origin frame.'
2188+
21872189
// When the experimentalSessionAndOrigin feature is disabled, we will immediately and display this message.
21882190
expect(err.message).to.equal(stripIndent`\
21892191
Cypress detected a cross origin error happened on page load:\n
2190-
> Blocked a frame with origin "http://localhost:3500" from accessing a cross-origin frame.\n
2192+
> ${error}\n
21912193
Before the page load, you were bound to the origin policy:\n
21922194
> http://localhost:3500\n
21932195
A cross origin error happens when your application navigates to a new URL which does not match the origin policy above.\n

0 commit comments

Comments
 (0)