Skip to content

Commit 0001f6a

Browse files
authored
Merge pull request #4763 from cypress-io/update-legacy-config
Update configuration & include v10 note
2 parents dc7b7b1 + c38ab3e commit 0001f6a

File tree

5 files changed

+39
-28
lines changed

5 files changed

+39
-28
lines changed
Loading
Loading
72.6 KB
Loading

content/_data/sidebar.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@
309309
"slug": "assertions"
310310
},
311311
{
312-
"title": "Configuration",
312+
"title": "Configuration (Legacy)",
313313
"slug": "configuration"
314314
},
315315
{

content/guides/references/configuration.md

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
---
2-
title: Configuration
2+
title: Configuration (Legacy)
33
---
44

5+
<Alert type="warning">
6+
7+
If you are on a newer version of Cypress that uses `cypress.config.js` or
8+
`cypress.config.ts`, please see the
9+
[v10 configuration](https://docs.cypress.io/guides/references/configuration)
10+
guide.
11+
12+
For more info on upgrading configuration to Cypress v10, see the
13+
[migration guide](https://docs.cypress.io/guides/references/migration-guide).
14+
15+
</Alert>
16+
517
## cypress.json
618

7-
The first time you open Cypress Test Runner, it creates the `cypress.json`
8-
configuration file. This JSON file is used to store any configuration values you
9-
supply. If you
10-
[configure your tests to record](/guides/dashboard/projects#Setup) the results
11-
to the [Cypress Dashboard](https://on.cypress.io/dashboard-introduction) the
12-
`projectId` will be written in this file too.
19+
The first time you open Cypress, it creates the `cypress.json` configuration
20+
file. This JSON file is used to store any configuration values you supply. If
21+
you [configure your tests to record](/guides/dashboard/projects#Setup) the
22+
results to the [Cypress Dashboard](https://on.cypress.io/dashboard-introduction)
23+
the `projectId` will be written in this file too.
1324

1425
<Alert type="warning">
1526

16-
<strong class="alert-header">Change Configuration File</strong>
27+
<strong>Change Configuration File</strong>
1728

1829
You can change the configuration file or turn off the use of a configuration
1930
file by using the
@@ -158,7 +169,7 @@ The Node version is used in Cypress to:
158169
- Execute code in the
159170
[pluginsFile](/guides/references/configuration#Folders-Files).
160171

161-
<DocsImage src="/img/guides/test-runner-settings-nodejs-version.jpg" alt="Node version in Settings in Test Runner" ></DocsImage>
172+
<DocsImage src="/img/guides/configuration/test-runner-settings-nodejs-version.jpg" alt="Node version in Settings in Cypress"></DocsImage>
162173

163174
### Experiments
164175

@@ -335,7 +346,6 @@ at run time.
335346
- `env` **note:** Provided environment variables will be merged with current
336347
environment variables.
337348
- `execTimeout`
338-
- `experimentalSessionSupport`
339349
- `includeShadowDom`
340350
- `keystrokeDelay`
341351
- `numTestsKeptInMemory`
@@ -448,7 +458,7 @@ value has been set via the following ways:
448458
- [Command Line arguments](/guides/guides/command-line)
449459
- [Plugins file](/api/plugins/configuration-api)
450460

451-
<DocsImage src="/img/guides/configuration/see-resolved-configuration.jpg" alt="See resolved configuration" ></DocsImage>
461+
<DocsImage src="/img/guides/configuration/see-resolved-configuration.jpg" alt="See resolved configuration"></DocsImage>
452462

453463
## Notes
454464

@@ -458,7 +468,7 @@ By passing a string or array of strings you can block requests made to one or
458468
more hosts.
459469

460470
To see a working example of this please check out our
461-
[Stubbing Google Analytics Recipe](/examples/examples/recipes#Stubbing-and-spying).
471+
[Stubbing Google Analytics Recipe](/examples/recipes#Stubbing-and-spying).
462472

463473
To block a host:
464474

@@ -519,7 +529,7 @@ When Cypress blocks a request made to a matching host, it will automatically
519529
send a `503` status code. As a convenience it also sets a
520530
`x-cypress-matched-blocked-host` header so you can see which rule it matched.
521531

522-
<DocsImage src="/img/guides/blocked-host.png" alt="Network tab of dev tools with analytics.js request selected and the response header highlighted " ></DocsImage>
532+
<DocsImage src="/img/guides/references/blocked-host.png" alt="Network tab of dev tools with analytics.js request selected and the response header highlighted"></DocsImage>
523533

524534
### modifyObstructiveCode
525535

@@ -576,7 +586,7 @@ interact with the browser.
576586
Because GC adds additional time to the overall run, we've added the amount of
577587
time this routine has taken to the bottom of the Command Log in the Test Runner.
578588

579-
<DocsImage src="/img/guides/firefox-gc-interval-in-command-log.jpg" alt="GC duration shown"></DocsImage>
589+
<DocsImage src="/img/guides/configuration/firefox-gc-interval-in-command-log.jpg" alt="GC duration shown"></DocsImage>
580590

581591
#### Configuration
582592

@@ -711,19 +721,20 @@ DEBUG=cypress:cli,cypress:server:specs
711721

712722
## History
713723

714-
| Version | Changes |
715-
| -------------------------------------------- | ------------------------------------------------------- |
716-
| [8.7.0](/guides/references/changelog#8-7-0) | Added `slowTestThreshold` option |
717-
| [8.0.0](/guides/references/changelog#8-0-0) | Added `clientCertificates` option |
718-
| [7.0.0](/guides/references/changelog#7-0-0) | Added `e2e` and `component` options. |
719-
| [7.0.0](/guides/references/changelog#7-0-0) | Added `redirectionLimit` option. |
720-
| [6.1.0](/guides/references/changelog#6-1-0) | Added `scrollBehavior` option. |
721-
| [5.2.0](/guides/references/changelog#5-2-0) | Added `includeShadowDom` option. |
722-
| [5.0.0](/guides/references/changelog#5-0-0) | Added `retries` configuration. |
723-
| [5.0.0](/guides/references/changelog#5-0-0) | Renamed `blacklistHosts` configuration to `blockHosts`. |
724-
| [4.1.0](/guides/references/changelog#4-12-0) | Added `screenshotOnRunFailure` configuration. |
725-
| [4.0.0](/guides/references/changelog#4-0-0) | Added `firefoxGcInterval` configuration. |
726-
| [3.5.0](/guides/references/changelog#3-5-0) | Added `nodeVersion` configuration. |
724+
| Version | Changes |
725+
| --------------------------------------------- | ------------------------------------------------------- |
726+
| [10.0.0](/guides/references/changelog#10-0-0) | Added page due to deprecation of `cypress.json` file |
727+
| [8.7.0](/guides/references/changelog#8-7-0) | Added `slowTestThreshold` option |
728+
| [8.0.0](/guides/references/changelog#8-0-0) | Added `clientCertificates` option |
729+
| [7.0.0](/guides/references/changelog#7-0-0) | Added `e2e` and `component` options. |
730+
| [7.0.0](/guides/references/changelog#7-0-0) | Added `redirectionLimit` option. |
731+
| [6.1.0](/guides/references/changelog#6-1-0) | Added `scrollBehavior` option. |
732+
| [5.2.0](/guides/references/changelog#5-2-0) | Added `includeShadowDom` option. |
733+
| [5.0.0](/guides/references/changelog#5-0-0) | Added `retries` configuration. |
734+
| [5.0.0](/guides/references/changelog#5-0-0) | Renamed `blacklistHosts` configuration to `blockHosts`. |
735+
| [4.1.0](/guides/references/changelog#4-12-0) | Added `screenshotOnRunFailure` configuration. |
736+
| [4.0.0](/guides/references/changelog#4-0-0) | Added `firefoxGcInterval` configuration. |
737+
| [3.5.0](/guides/references/changelog#3-5-0) | Added `nodeVersion` configuration. |
727738

728739
## See also
729740

0 commit comments

Comments
 (0)