Skip to content

Commit deb58d6

Browse files
mjhenkesAtofStrykeremilyrohrboughchrisbreidingBlueWinds
authored
BREAKING: 13.0 Docs (#5315)
* BREAKING: update documentation by setting default video: false for v13.0.0 (#5300) * BREAKING: update documentation by setting default video: false * Update docs/guides/overview/why-cypress.mdx Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * Update docs/guides/end-to-end-testing/migration/protractor-to-cypress.mdx Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * Update docs/guides/continuous-integration/introduction.mdx Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * Update docs/guides/guides/screenshots-and-videos.mdx Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * chore: re-order video bits * Update docs/guides/end-to-end-testing/migration/protractor-to-cypress.mdx * chore: linting --------- Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * breaking: update documentation by setting videoCompression: false (#5301) * BREAKING: update documentation by setting default video: false * BREAKING: update documentation by setting videoCompression: false * Update docs/guides/guides/screenshots-and-videos.mdx Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com> * apply suggestion from code review * chore: attempt to rework the video encoding section * Update docs/guides/guides/screenshots-and-videos.mdx Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * chore: address comments in code review * chore: update video encoding guide to flow a bit more evenly --------- Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * BREAKING: remove the videoUploadOnPasses configuration option (#5306) * BREAKING: remove the videoUploadOnPasses configuration option * chore: add history entry of removed videoUploadOnPasses config option * .readFile() is now a query (#5017) (#5316) * .readFile() is now a query * Add section on new .readFile() superpowers * Fix page slug for readFile * Prettier run Co-authored-by: Blue F <blue@everblue.info> * Update guides for Cy 13, where assertions are now commands (#5081) * .readFile() is now a query (#5017) * .readFile() is now a query * Add section on new .readFile() superpowers * Fix page slug for readFile * Prettier run * Update guides to better support users in Cy 13, where assertions are now commands * Review updates * Apply suggestions from code review Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> * Partial review feedback (more to come) * Review updates * Prettier run * fix: update retry ability guide and migration guide now that should() and and() will not be queries in v13. see cypress-io/cypress#25738 * chore: correct number of queries in example * revert: images changes due to should() and and() being queries, which is no longer applicable due to cypress-io/cypress#25738 * chore: lint guides --------- Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: Bill Glesias <bglesias@gmail.com> * Apply suggestions from code review Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> * Remove nodeVersion documentation (#5318) * Remove reference to 'nodeVersion' * added history, removed changes to legacy * docs: v13 video and TR migration info (#5383) * added video config migration info * added tr migration info * PR feedback * PR feedback * PR feedback * Apply suggestions from code review Co-authored-by: Bill Glesias <bglesias@gmail.com> * Update docs/guides/references/migration-guide.mdx Co-authored-by: Jennifer Shehane <jennifer@cypress.io> --------- Co-authored-by: Bill Glesias <bglesias@gmail.com> Co-authored-by: Jennifer Shehane <jennifer@cypress.io> * Update results for module API and after:spec handler (#5379) * docs: adding documentation for runner-ui cli flags (#5424) * docs: test replay docs (#5349) * sidebar content shuffle * main feature content & link updates * add screenshots * add url to vpn whitelist * add TR banner * add & reorder faq * build test replay partial * add TR partial to related content * add TR link to related "see more" sections * content tweaks * include TR content in body copy * add troubleshooting * remove old images * add PR feedback * add command log notes * remove dead link * update images * replace runs page screenshots * Apply suggestions from code review Co-authored-by: Jennifer Shehane <jennifer@cypress.io> Co-authored-by: Bill Glesias <bglesias@gmail.com> Co-authored-by: Jennifer Shehane <jennifer@cypress.io> * add more faqs * restore missing partial export * fix links * swap in screenshot of new network panel * Apply suggestions from code review Co-authored-by: Bill Glesias <bglesias@gmail.com> * fix command line merge issue * lint * Update docs/guides/cloud/debugging/recorded-runs.mdx Co-authored-by: Bill Glesias <bglesias@gmail.com> * Apply suggestions from code review Co-authored-by: Bill Glesias <bglesias@gmail.com> --------- Co-authored-by: Jennifer Shehane <jennifer@cypress.io> Co-authored-by: Bill Glesias <bglesias@gmail.com> * Fix JavaScript caps * Fix caps of JavaScript * Fix typo * Write a document around Cloud data storage and controls (#5425) Co-authored-by: Paul Jaffre <jaffrepaul@gmail.com> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> * add changelog, remove node 16 support, and update docker image refere… (#5434) * add changelog, remove node 16 support, and update docker image reference to be on at least node 18 * Update docs/guides/references/changelog.mdx * docs: minor v13 updates (#5438) * match data callout with data storage page * remove mention from artifacts panel * remove submitting feature requests callout * build & insert cloud free plan partial * docs: update v13 content urls (#5428) * update content urls * add todo * replace v13 changelog urls * docs: v13 changelog summary (#5441) * changelog summary * Update docs/guides/references/changelog.mdx Co-authored-by: Jennifer Shehane <jennifer@cypress.io> * tweak verbaige & lint --------- Co-authored-by: Jennifer Shehane <jennifer@cypress.io> * Apply suggestions from code review Co-authored-by: Bill Glesias <bglesias@gmail.com> * lint * Update docs/faq/questions/cloud-faq.mdx Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> * include TR note in cypress screenshot api options (#5445) * docs: additional test replay content (#5447) * add TR cost faq * add centos troubleshooting * sync up changelog * Update _cloud_free_plan.mdx minor text update --------- Co-authored-by: Bill Glesias <bglesias@gmail.com> Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com> Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com> Co-authored-by: Blue F <blue@everblue.info> Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Co-authored-by: Paul Jaffre <jaffrepaul@gmail.com> Co-authored-by: Jennifer Shehane <jennifer@cypress.io> Co-authored-by: Matt Schile <mschile@cypress.io> Co-authored-by: Chris Breiding <chrisbreiding@gmail.com> Co-authored-by: Paul Jaffre <paul@cypress.io>
1 parent 47865db commit deb58d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+980
-377
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ orbs:
66
executors:
77
node-executor:
88
docker:
9-
- image: cimg/node:16.15.1
9+
- image: cimg/node:18.15.0
1010
with-chrome-and-firefox:
1111
resource_class: medium+
1212
docker:
13-
- image: 'cypress/browsers:node16.13.2-chrome97-ff96'
13+
- image: 'cypress/browsers:node18.12.0-chrome106-ff106'
1414

1515
commands:
1616
docs-build:

docs/api/commands/screenshot.mdx

+18-17
Large diffs are not rendered by default.

docs/api/cypress-api/screenshot-api.mdx

+10-10
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ Cypress.Screenshot.defaults(options)
2727

2828
An object containing one or more of the following:
2929

30-
| Option | Default | Description |
31-
| ---------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
32-
| `blackout` | `[]` | Array of string selectors used to match elements that should be blacked out when the screenshot is taken. Does not apply to `runner` captures. |
33-
| `capture` | `'fullPage'` | Which parts of the Cypress Test Runner to capture. This value is ignored for element screenshot captures. Valid values are `viewport`, `fullPage`, or `runner`. When `viewport`, your application under test is captured in the current viewport. When `fullPage`, your application under test is captured in its entirety from top to bottom. When `runner`, the entire browser viewport, including the Cypress Command Log, is captured. For screenshots automatically taken on test failure, capture is always coerced to `runner`. |
34-
| `disableTimersAndAnimations` | `true` | When true, prevents JavaScript timers (`setTimeout`, `setInterval`, etc) and CSS animations from running while the screenshot is taken. |
35-
| `scale` | `false` | Whether to scale the app to fit into the browser viewport. This is always coerced to `true` for `runner` captures. |
36-
| `screenshotOnRunFailure` | `true` | When true, automatically takes a screenshot when there is a failure during `cypress run`. |
37-
| `overwrite` | `false` | Whether to overwrite duplicate screenshot files with the same file name when saving. |
38-
| `onBeforeScreenshot` | `null` | A callback before a (non-failure) screenshot is taken. For an element capture, the argument is the element being captured. For other screenshots, the argument is the `$el`. |
39-
| `onAfterScreenshot` | `null` | A callback after a (non-failure) screenshot is taken. For an element capture, the first argument is the element being captured. For other screenshots, the first argument is the `$el`. The second argument is properties concerning the screenshot, including the path it was saved to and the dimensions of the saved screenshot. |
30+
| Option | Default | Description |
31+
| ---------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
32+
| `blackout` | `[]` | Array of string selectors used to match elements that should be blacked out when the screenshot is taken. Does not apply to `runner` captures. |
33+
| `capture` | `'fullPage'` | Which parts of the Cypress Test Runner to capture. This value is ignored for element screenshot captures. Valid values are `viewport`, `fullPage`, or `runner`. When `viewport`, your application under test is captured in the current viewport. When `fullPage`, your application under test is captured in its entirety from top to bottom. When `runner`, the entire browser viewport, including the Cypress Command Log, is captured. For screenshots automatically taken on test failure, capture is always coerced to `runner`. When [Test Replay](/guides/cloud/debugging/test-replay) is enabled and the Runner UI is hidden, a `runner` screenshot will not include the Runner UI and will instead capture the application under test only in the current viewport. |
34+
| `disableTimersAndAnimations` | `true` | When true, prevents JavaScript timers (`setTimeout`, `setInterval`, etc) and CSS animations from running while the screenshot is taken. |
35+
| `scale` | `false` | Whether to scale the app to fit into the browser viewport. This is always coerced to `true` for `runner` captures. |
36+
| `screenshotOnRunFailure` | `true` | When true, automatically takes a screenshot when there is a failure during `cypress run`. |
37+
| `overwrite` | `false` | Whether to overwrite duplicate screenshot files with the same file name when saving. |
38+
| `onBeforeScreenshot` | `null` | A callback before a (non-failure) screenshot is taken. For an element capture, the argument is the element being captured. For other screenshots, the argument is the `$el`. |
39+
| `onAfterScreenshot` | `null` | A callback after a (non-failure) screenshot is taken. For an element capture, the first argument is the element being captured. For other screenshots, the first argument is the `$el`. The second argument is properties concerning the screenshot, including the path it was saved to and the dimensions of the saved screenshot. |
4040

4141
## Examples
4242

docs/api/plugins/after-spec-api.mdx

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ on('after:spec', (spec, results) => {
7979
// {
8080
// title: ['login', 'logs user in'],
8181
// state: 'passed',
82-
// body: 'function () {}',
8382
// // ...more properties...
8483
// }
8584
// ],

docs/api/commands/readfile.mdx renamed to docs/api/queries/readfile.mdx

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: readFile
3+
slug: /api/commands/readfile
34
---
45

56
Read a file and yield its contents.
@@ -62,8 +63,8 @@ Pass in an options object to change the default behavior of `cy.readFile()`.
6263
### Yields [<Icon name="question-circle"/>](/guides/core-concepts/introduction-to-cypress#Subject-Management) {#Yields}
6364

6465
- `cy.readFile()` yields the contents of the file.
65-
- The file will not be read from disk again if the results are stored in an
66-
alias.
66+
- The file will be read from disk again if any upcoming command (such as an
67+
assertion) in the chain fails.
6768

6869
## Examples
6970

@@ -195,6 +196,15 @@ assertions.
195196
cy.readFile('some/nested/path/story.txt').should('eq', 'Once upon a time...')
196197
```
197198

199+
Starting in Cypress `v13`, `cy.readFile()` is a query, and will continue to read
200+
the file until all chained commands of any type pass, not just assertions.
201+
202+
```javascript
203+
// will retry until the json file has a `users[123].name` field, and
204+
// the assertion passes
205+
cy.readFile('users.json').its('users.123.name').should('eq', 'John Doe')
206+
```
207+
198208
## Rules
199209

200210
### Requirements [<Icon name="question-circle"/>](/guides/core-concepts/introduction-to-cypress#Chains-of-Commands) {#Requirements}
@@ -247,6 +257,7 @@ outputs the following:
247257

248258
| Version | Changes |
249259
| --------------------------------------------- | ----------------------------------------- |
260+
| [13.0.0](/guides/references/changelog#13-0-0) | `cy.readFile()` became a query |
250261
| [9.0.0](/guides/references/changelog#9-0-0) | Changed `null` encoding to read as Buffer |
251262
| [0.17.2](/guides/references/changelog#0-17-2) | Improved error messaging |
252263
| [0.17.1](/guides/references/changelog#0-17-1) | `cy.readFile()` command added |
@@ -255,5 +266,6 @@ outputs the following:
255266

256267
- [`cy.exec()`](/api/commands/exec)
257268
- [`cy.fixture()`](/api/commands/fixture) for a similar command with caching
269+
that does not retry
258270
- [`cy.task()`](/api/commands/task)
259271
- [`cy.writeFile()`](/api/commands/writefile)

0 commit comments

Comments
 (0)