Skip to content
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

Rename configuration option blacklistHosts to blocklistHosts #2861

Merged
merged 12 commits into from
Jul 13, 2020
Merged
2 changes: 1 addition & 1 deletion cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"baseUrl": "http://localhost:2222",
"projectId": "ma3dkn",
"viewportWidth": 1500,
"blacklistHosts": ["trackcmp.net", "js.hs-analytics.net", "js.hs-scripts.com"]
"blocklisthosts": ["trackcmp.net", "js.hs-analytics.net", "js.hs-scripts.com"]
laiscoolblue marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 1 addition & 1 deletion source/faq/questions/using-cypress-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Yes. {% url "You can override this with `userAgent` in your configuration file (

## {% fa fa-angle-right %} Can I block traffic going to specific domains? I want to block Google Analytics or other providers.

Yes. {% url "You can set this with `blacklistHosts` in your configuration file (`cypress.json` by default)." configuration#Browser %}
Yes. {% url "You can set this with `blocklisthosts` in your configuration file (`cypress.json` by default)." configuration#Browser %}
laiscoolblue marked this conversation as resolved.
Show resolved Hide resolved

Also, check out our {% url 'Stubbing Google Analytics Recipe' recipes#Stubbing-and-spying %}.

Expand Down
2 changes: 1 addition & 1 deletion source/guides/overview/key-differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Having ultimate control over your application, the network traffic, and native a
- Test how your application responds to errors on your server by {% url "modifying response status codes to be 500" route %>.
- Modify DOM elements directly - like forcing hidden elements to be shown.
- Use 3rd party plugins programmatically. Instead of fussing with complex UI widgets like multi selects, autocompletes, drop downs, tree views or calendars, you can call methods directly from your test code to control them.
- <% url "Prevent Google Analytics from loading *before* any of your application code executes" configuration#blacklistHosts %> when testing.
- <% url "Prevent Google Analytics from loading *before* any of your application code executes" configuration#blocklisthosts %> when testing.
- Get synchronous notifications whenever your application transitions to a new page or when it begins to unload.
- {% url "Control time by moving forward or backward" clock %} so that timers or polls automatically fire without having to wait for the required time in your tests.
- Add your own event listeners to respond to your application. You could update your application code to behave differently when under tests in Cypress. You can control WebSocket messages from within Cypress, conditionally load 3rd party scripts, or call functions directly on your application.
Expand Down
4 changes: 2 additions & 2 deletions source/guides/references/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Option | Default | Description
Option | Default | Description
----- | ---- | ----
`chromeWebSecurity` | `true` | Whether to enable Chromium-based browser's Web Security for same-origin policy and insecure mixed content. {% url 'Read more about Web Security' web-security %}.
`blacklistHosts` | `null` | A String or Array of hosts that you wish to block traffic for. {% urlHash 'Please read the notes for examples on using this.' blacklistHosts %}
`blocklisthosts` | `null` | A String or Array of hosts that you wish to block traffic for. {% urlHash 'Please read the notes for examples on using this.' blocklisthosts %}
laiscoolblue marked this conversation as resolved.
Show resolved Hide resolved
`firefoxGcInterval` | `{ "runMode": 1, "openMode": null }` | Controls whether Cypress forces Firefox to run garbage collection (GC) cleanup and how frequently. During {% url "`cypress run`" command-line#cypress-run %}, the default value is `1`. During {% url "`cypress open`" command-line#cypress-open %}, the default value is `null`. See full details {% urlHash "here" firefoxGcInterval %}.
`modifyObstructiveCode` | `true` | Whether Cypress will search for and replace obstructive JS code in `.js` or `.html` files. {% urlHash 'Please read the notes for more information on this setting.' modifyObstructiveCode %}
`userAgent` | `null` | Enables you to override the default user agent the browser sends in all request headers. User agent values are typically used by servers to help identify the operating system, browser, and browser version. See {% url "User-Agent MDN Documentation" https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent %} for example user agent values.
Expand Down Expand Up @@ -220,7 +220,7 @@ When you open a Cypress project, clicking on the **Settings** tab will display t

# Notes

## blacklistHosts
## blocklisthosts
laiscoolblue marked this conversation as resolved.
Show resolved Hide resolved

By passing a string or array of strings you can block requests made to one or more hosts.

Expand Down