cypress 8.0.0 → 8.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/lib/util.js +11 -1
- package/package.json +2 -2
- package/types/cypress.d.ts +33 -6
- package/types/net-stubbing.ts +3 -1
package/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# Cypress
|
2
2
|
|
3
|
+
Fast, easy and reliable testing for anything that runs in a browser.
|
4
|
+
|
3
5
|
## What is this?
|
4
6
|
|
5
|
-
Cypress comes packaged as an `npm` module, which is all you need to get started.
|
7
|
+
[Cypress](https://www.cypress.io/) comes packaged as an `npm` module, which is all you need to get started testing.
|
6
8
|
|
7
9
|
After installing you'll be able to:
|
8
10
|
|
@@ -12,7 +14,7 @@ After installing you'll be able to:
|
|
12
14
|
|
13
15
|
## Install
|
14
16
|
|
15
|
-
|
17
|
+
Please check our [system requirements](https://on.cypress.io/installing-cypress).
|
16
18
|
|
17
19
|
```sh
|
18
20
|
npm install --save-dev cypress
|
package/lib/util.js
CHANGED
@@ -263,7 +263,17 @@ const util = {
|
|
263
263
|
.mapValues(value => {
|
264
264
|
// stringify to 1 or 0
|
265
265
|
return value ? '1' : '0';
|
266
|
-
}).value();
|
266
|
+
}).extend(util.getOriginalNodeOptions(options)).value();
|
267
|
+
},
|
268
|
+
|
269
|
+
getOriginalNodeOptions(options) {
|
270
|
+
if (process.env.NODE_OPTIONS) {
|
271
|
+
return {
|
272
|
+
ORIGINAL_NODE_OPTIONS: process.env.NODE_OPTIONS
|
273
|
+
};
|
274
|
+
}
|
275
|
+
|
276
|
+
return {};
|
267
277
|
},
|
268
278
|
|
269
279
|
getForceTty() {
|
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.3.1",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
7
7
|
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
|
8
8
|
},
|
9
9
|
"dependencies": {
|
10
|
-
"@cypress/request": "^2.88.
|
10
|
+
"@cypress/request": "^2.88.6",
|
11
11
|
"@cypress/xvfb": "^1.2.4",
|
12
12
|
"@types/node": "^14.14.31",
|
13
13
|
"@types/sinonjs__fake-timers": "^6.0.2",
|
package/types/cypress.d.ts
CHANGED
@@ -258,6 +258,14 @@ declare namespace Cypress {
|
|
258
258
|
*/
|
259
259
|
spec: Spec
|
260
260
|
|
261
|
+
/**
|
262
|
+
* Currently executing test runnable instance.
|
263
|
+
*/
|
264
|
+
currentTest: {
|
265
|
+
title: string,
|
266
|
+
titlePath: string[]
|
267
|
+
}
|
268
|
+
|
261
269
|
/**
|
262
270
|
* Information about the browser currently running the tests
|
263
271
|
*/
|
@@ -557,6 +565,10 @@ declare namespace Cypress {
|
|
557
565
|
onSpecWindow: (window: Window, specList: string[] | Array<() => Promise<void>>) => void
|
558
566
|
}
|
559
567
|
|
568
|
+
interface SessionOptions {
|
569
|
+
validate?: () => false|void
|
570
|
+
}
|
571
|
+
|
560
572
|
type CanReturnChainable = void | Chainable | Promise<unknown>
|
561
573
|
type ThenReturn<S, R> =
|
562
574
|
R extends void ? Chainable<S> :
|
@@ -952,6 +964,15 @@ declare namespace Cypress {
|
|
952
964
|
*/
|
953
965
|
debug(options?: Partial<Loggable>): Chainable<Subject>
|
954
966
|
|
967
|
+
/**
|
968
|
+
* Save/Restore browser Cookies, LocalStorage, and SessionStorage data resulting from the supplied `setup` function.
|
969
|
+
*
|
970
|
+
* Only available if the `experimentalSessionSupport` config option is enabled.
|
971
|
+
*
|
972
|
+
* @see https://on.cypress.io/session
|
973
|
+
*/
|
974
|
+
session(id: string|object, setup?: SessionOptions['validate'], options?: SessionOptions): Chainable<null>
|
975
|
+
|
955
976
|
/**
|
956
977
|
* Get the window.document of the page that is currently active.
|
957
978
|
*
|
@@ -961,7 +982,7 @@ declare namespace Cypress {
|
|
961
982
|
* .its('contentType')
|
962
983
|
* .should('eq', 'text/html')
|
963
984
|
*/
|
964
|
-
document(options?: Partial<Loggable>): Chainable<Document>
|
985
|
+
document(options?: Partial<Loggable & Timeoutable>): Chainable<Document>
|
965
986
|
|
966
987
|
/**
|
967
988
|
* Iterate through an array like structure (arrays or objects with a length property).
|
@@ -1661,7 +1682,7 @@ declare namespace Cypress {
|
|
1661
1682
|
* .shadow()
|
1662
1683
|
* .find('.my-button')
|
1663
1684
|
* .click()
|
1664
|
-
* @see https://on.cypress.io/
|
1685
|
+
* @see https://on.cypress.io/shadow
|
1665
1686
|
*/
|
1666
1687
|
shadow(): Chainable<Subject>
|
1667
1688
|
|
@@ -1937,7 +1958,7 @@ declare namespace Cypress {
|
|
1937
1958
|
*
|
1938
1959
|
* @see https://on.cypress.io/title
|
1939
1960
|
*/
|
1940
|
-
title(options?: Partial<Loggable>): Chainable<string>
|
1961
|
+
title(options?: Partial<Loggable & Timeoutable>): Chainable<string>
|
1941
1962
|
|
1942
1963
|
/**
|
1943
1964
|
* Trigger an event on a DOM element.
|
@@ -2653,6 +2674,11 @@ declare namespace Cypress {
|
|
2653
2674
|
* @default 'top'
|
2654
2675
|
*/
|
2655
2676
|
scrollBehavior: scrollBehaviorOptions
|
2677
|
+
/**
|
2678
|
+
* Enable experimental session support. See https://on.cypress.io/session
|
2679
|
+
* @default false
|
2680
|
+
*/
|
2681
|
+
experimentalSessionSupport: boolean
|
2656
2682
|
/**
|
2657
2683
|
* Allows listening to the `before:run`, `after:run`, `before:spec`, and `after:spec` events in the plugins file during interactive mode.
|
2658
2684
|
* @default false
|
@@ -2717,13 +2743,13 @@ declare namespace Cypress {
|
|
2717
2743
|
* Override default config options for Component Testing runner.
|
2718
2744
|
* @default {}
|
2719
2745
|
*/
|
2720
|
-
component: Omit<ResolvedConfigOptions,
|
2746
|
+
component: Omit<ResolvedConfigOptions, TestingType>
|
2721
2747
|
|
2722
2748
|
/**
|
2723
2749
|
* Override default config options for E2E Testing runner.
|
2724
2750
|
* @default {}
|
2725
2751
|
*/
|
2726
|
-
e2e: Omit<ResolvedConfigOptions,
|
2752
|
+
e2e: Omit<ResolvedConfigOptions, TestingType>
|
2727
2753
|
}
|
2728
2754
|
|
2729
2755
|
/**
|
@@ -2809,7 +2835,7 @@ declare namespace Cypress {
|
|
2809
2835
|
/**
|
2810
2836
|
* All configuration items are optional.
|
2811
2837
|
*/
|
2812
|
-
type CoreConfigOptions = Partial<Omit<ResolvedConfigOptions,
|
2838
|
+
type CoreConfigOptions = Partial<Omit<ResolvedConfigOptions, TestingType>>
|
2813
2839
|
type ConfigOptions = CoreConfigOptions & {e2e?: CoreConfigOptions, component?: CoreConfigOptions }
|
2814
2840
|
|
2815
2841
|
interface PluginConfigOptions extends ResolvedConfigOptions {
|
@@ -5509,6 +5535,7 @@ declare namespace Cypress {
|
|
5509
5535
|
|
5510
5536
|
interface Log {
|
5511
5537
|
end(): Log
|
5538
|
+
error(error: Error): Log
|
5512
5539
|
finish(): void
|
5513
5540
|
get<K extends keyof LogConfig>(attr: K): LogConfig[K]
|
5514
5541
|
get(): LogConfig
|
package/types/net-stubbing.ts
CHANGED
@@ -267,9 +267,11 @@ interface RequestEvents {
|
|
267
267
|
*/
|
268
268
|
export interface Interception {
|
269
269
|
id: string
|
270
|
+
/* @internal */
|
271
|
+
browserRequestId?: string
|
270
272
|
routeId: string
|
271
273
|
/* @internal */
|
272
|
-
|
274
|
+
setLogFlag: (flag: 'spied' | 'stubbed' | 'reqModified' | 'resModified') => void
|
273
275
|
request: CyHttpMessages.IncomingRequest
|
274
276
|
/**
|
275
277
|
* Was `cy.wait()` used to wait on this request?
|