You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding readFile/writeFile doc around new timeout features (cypress-io#4244)
* docs: Add documentation for using child/dual commands in TS (cypress-io#4263)
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
* 9.2.0 changelog.
* add changelog for #18290
* chore: clarify cy.intercept fixture encoding behavior (cypress-io#4278)
Co-authored-by: Ben Alman <cowboy@rj3.net>
* types in interept command docs
* add chagnelog for #19363
* add changelogs for #19377 & #18549
* typo. Thanks Shawn
* Adding info for CYPRESS_VERIFY_TIMEOUT (cypress-io#4271)
* Adding info for CYPRESS_VERIFY_TIMEOUT
* Updating docs with other PR content and additional clarification around verify usage
* Update List of Valid Test Configuration Config Values (cypress-io#4252)
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com>
Co-authored-by: Den Klimovsky <xumepadismal@users.noreply.github.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@yahoo.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Ben Alman <cowboy@rj3.net>
Co-authored-by: David Munechika <david@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
| body | Serve a static response body (`object`, `string`, `ArrayBuffer`) (when `fixture` is omitted). |
1328
+
| fixture | Serve a fixture as the HTTP response body (allowed when `body` is omitted). Read the contents with an encoding other than the [default for the file type](/api/commands/fixture#Encoding), pass the fixture like `path,encoding`. |
1329
+
| forceNetworkError | Force an error by destroying the browser connection |
1330
+
| delay | Minimum network latency or delay to add to the response time (milliseconds) |
1331
+
| throttleKbps | Maximum data transfer rate of the response (kilobits/second) |
1331
1332
1332
-
- Directly to `cy.intercept()` as
1333
-
[`staticResponse`](#staticResponse-lt-code-gtStaticResponselt-code-gt), to
1334
-
stub a response to a route: `cy.intercept('/url', staticResponse)`
1333
+
**Note:** All properties are optional.
1334
+
1335
+
You can supply a `StaticResponse` to Cypress in 3 ways:
1336
+
1337
+
- To `cy.intercept()` as
1338
+
[`an argument`](#staticResponse-lt-code-gtStaticResponselt-code-gt), to stub a
1339
+
response to a route: `cy.intercept('/url', staticResponse)`
1335
1340
- To [`req.reply()`][req-reply], to stub a response from a request handler:
1336
1341
`req.reply(staticResponse)`
1337
1342
- To [`res.send()`][res-send], to stub a response from a response handler:
1338
1343
`res.send(staticResponse)`
1339
1344
1340
-
The following properties are available on `StaticResponse`. All properties are
|`log`|`true`| Displays the command in the [Command log](/guides/core-concepts/test-runner#Command-Log)|
64
+
|`flag`|`w`| File system flag as used with [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_file_system_flags)|
65
+
|`encoding`|`utf8`| The encoding to be used when writing to the file |
66
+
|`timeout`|[`defaultCommandTimeout`](/guides/references/configuration#Timeouts)| Time to wait for `.writeFile()` to resolve before [timing out](#Timeouts)|
66
67
67
68
<Alerttype="info">
68
69
@@ -74,8 +75,7 @@ parameter and include encoding there. This is the same behavior as
0 commit comments