-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Config option - injecting document.domain #5974
base: release/14.0.0
Are you sure you want to change the base?
Conversation
…ection removal and reversion
docs/api/commands/origin.mdx
Outdated
the two origins are in the same superdomain. This behavior can be disabled with | ||
the `injectDocumentDomain` configuration option, to allow a transition period. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the two origins are in the same superdomain. This behavior can be disabled with | |
the `injectDocumentDomain` configuration option, to allow a transition period. | |
the two origins are in the same superdomain. This behavior can be disabled by setting the `injectDocumentDomain` configuration option to `true`, to allow a smooth transition of tests to the new behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 644aa61
2. [`.submit()`](/api/commands/submit) a `<form>` that causes your web server to | ||
redirect you a different superdomain where additional Cypress commands are | ||
redirect you a different origin where additional Cypress commands are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redirect you a different origin where additional Cypress commands are | |
redirect you to a different origin where additional Cypress commands are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 644aa61
|
||
::: | ||
|
||
:::tip | ||
|
||
<Icon name="check-circle" color="green" /> You **can** [visit](/api/commands/visit) | ||
two or more domains of different origin in **different** tests without needing [`cy.origin()`](/api/commands/origin). | ||
two or origins in **different** tests without needing [`cy.origin()`](/api/commands/origin). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two or origins in **different** tests without needing [`cy.origin()`](/api/commands/origin). | |
two or more origins in **different** tests without needing [`cy.origin()`](/api/commands/origin). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 644aa61
This option is <Badge type="caution">deprecated</Badge>, and will be removed in the next | ||
major version of Cypress. | ||
|
||
Set this configuration option is `true` to instruct Cypress to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set this configuration option is `true` to instruct Cypress to | |
Set this configuration option to `true` to instruct Cypress to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 644aa61
to behave in unexpected ways. This is especially true if a site your tests visit | ||
sets the [`Origin-Agent-Cluster`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to behave in unexpected ways. This is especially true if a site your tests visit | |
sets the [`Origin-Agent-Cluster`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster) | |
to behave in unexpected ways. This is especially true if the site under test | |
sets the [`Origin-Agent-Cluster`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 644aa61
@@ -68,6 +68,44 @@ For users with the existing `experimentalJustInTimeCompile` flag set, you can re | |||
|
|||
::: | |||
|
|||
### Changes to `cy.origin()` | |||
|
|||
To support sites that use [origin-keyed agent clusters](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster), Cypress no longer injects `document.domain` into `text/html` content by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to mention the document.domain deprecation somewhere here: https://developer.chrome.com/blog/document-domain-setter-deprecation - just want to give context that these are outward changes enforcing this direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 644aa61
cypress-documentation Run #193
Run Properties:
|
Project |
cypress-documentation
|
Branch Review |
config/inject-document-domain
|
Run status |
Passed #193
|
Run duration | 03m 21s |
Commit |
c7ff618f07: Update docs/app/references/configuration.mdx
|
Committer | Cacie Prins |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
279
|
View all changes introduced in this branch ↗︎ |
UI Coverage
10.89%
|
|
---|---|
Untested elements |
2227
|
Tested elements |
3
|
Accessibility
95.68%
|
|
---|---|
Failed rules |
2 critical
5 serious
4 moderate
0 minor
|
Failed elements |
530
|
docs/app/references/experiments.mdx
Outdated
| Option | Default | Description | | ||
| ------------------------- | ------- | --------------------------------------------------------------------------------------------------------- | | ||
| `experimentalStudio` | `false` | Generate and save commands directly to your test suite by interacting with your app as an end user would. | | ||
| `experimentalRunAllSpecs` | `false` | Enables the "Run All Specs" UI feature, allowing the execution of multiple specs sequentially. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cacieprins Did you mean to remove experimentalOriginDependencies
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental - resolved in 644aa61
@@ -64,7 +76,7 @@ const hits = getHits() | |||
cy.visit('https://example.cypress.io/history/founder') | |||
// To interact with cross-origin content, move this inside cy.origin() callback | |||
cy.get('h1').contains('About our Founder') | |||
// Domain must be a precise match including subdomain, i.e. example.cypress.io | |||
// Origin must be a precise match including scheme, subdomain and port, i.e. https://example.cypress.io | |||
cy.origin('cypress.io', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we update this example then to be an origin, like http://docs.cypress.io
?
@@ -113,17 +108,6 @@ used. | |||
Read on to learn about | |||
[working around these common problems](#Common-Workarounds). | |||
|
|||
#### What is a superdomain? | |||
|
|||
But what is same superdomain? It's actually very similar to that of same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay to superdomain no more!
|
||
The URLs below, however, will have different superdomains/origins compared to | ||
`https://www.cypress.io`. | ||
An `origin` is comprised of a URL's `scheme`, `hostname`, _and_ `port`. Given the URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is so much easier to interpret now as a normal web user IMO
#### Known Incompatibilities | ||
|
||
Setting this configuration value to `true` can cause the application you are testing | ||
to behave in unexpected ways. This is especially true if a site your tests visit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are implications if your site sets it, but there are also implications where the browser defaults the origin-agent-cluster
into buckets, which can cause problems. I think this is also worth mentioning
Co-authored-by: Bill Glesias <bglesias@gmail.com>
(draft pr for work relating to cypress-io/cypress#29590)