-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
visiting https
then http
of same subdomain fails saying you can only visit a single unique domain per test
#6048
Comments
That is the same my problem |
Visiting an I thought this may be a regression, but this happens all the way back to Cypress version 2 even. it('visit https after http subdomain', () => {
cy.visit('https://www.cypress.io')
cy.visit('http://docs.cypress.io') // fails
})
it('visit http after https subdomain', () => {
cy.visit('http://www.cypress.io')
cy.visit('https://docs.cypress.io') // passes
})
|
https
then http
of same subdomain fails saying you can only visit a single unique domain per test
WhyOk, so, after discussing this with the team, this is actually expected behavior. The rules for what we have been calling a 'single unique domain per test' are technically following the rules of Same Origin Policy as outlined here: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
So visiting a different protocol ( The reason the Next steps
|
There's a pull request to update the messaging of this error. The behavior is not in error nor a bug. This is expected behavior, but the messaging needs updating. #6118 |
The code for this is done in cypress-io/cypress#6118, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
what_it_does:
http://sports.sina.com.cn is subdomain , but error.
https://sports.sina.com.cn is ok.
Current behavior:
Desired behavior:
Steps to reproduce: (app code and test code)
Versions
Cypress: 3.8.0 │
Browser: Electron 78 (headless)
The text was updated successfully, but these errors were encountered: