cypress 9.6.1 → 10.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/index.mjs +15 -0
  2. package/lib/cli.js +72 -23
  3. package/lib/errors.js +16 -1
  4. package/lib/exec/open.js +45 -10
  5. package/lib/exec/run.js +17 -10
  6. package/lib/exec/shared.js +30 -9
  7. package/lib/exec/spawn.js +4 -0
  8. package/lib/exec/xvfb.js +1 -0
  9. package/lib/util.js +10 -3
  10. package/mount-utils/CHANGELOG.md +20 -0
  11. package/mount-utils/README.md +14 -0
  12. package/mount-utils/dist/index.d.ts +54 -0
  13. package/mount-utils/dist/index.js +134 -0
  14. package/mount-utils/package.json +31 -0
  15. package/package.json +39 -4
  16. package/react/CHANGELOG.md +373 -0
  17. package/react/README.md +414 -0
  18. package/react/dist/cypress-react.browser.js +497 -0
  19. package/react/dist/cypress-react.cjs.js +495 -0
  20. package/react/dist/cypress-react.esm-bundler.js +467 -0
  21. package/react/dist/getDisplayName.d.ts +8 -0
  22. package/react/dist/index.d.ts +2 -0
  23. package/react/dist/mount.d.ts +143 -0
  24. package/react/dist/mountHook.d.ts +11 -0
  25. package/react/package.json +105 -0
  26. package/types/bluebird/index.d.ts +18 -4
  27. package/types/cypress-eventemitter.d.ts +1 -1
  28. package/types/cypress-global-vars.d.ts +2 -2
  29. package/types/cypress-npm-api.d.ts +4 -10
  30. package/types/cypress.d.ts +180 -120
  31. package/types/minimatch/index.d.ts +15 -5
  32. package/vue/CHANGELOG.md +380 -0
  33. package/vue/README.md +678 -0
  34. package/vue/dist/cypress-vue.cjs.js +13535 -0
  35. package/vue/dist/cypress-vue.esm-bundler.js +13511 -0
  36. package/vue/dist/index.d.ts +56 -0
  37. package/vue/package.json +86 -0
  38. package/vue2/CHANGELOG.md +5 -0
  39. package/vue2/README.md +693 -0
  40. package/vue2/dist/cypress-vue2.browser.js +20191 -0
  41. package/vue2/dist/cypress-vue2.cjs.js +20188 -0
  42. package/vue2/dist/cypress-vue2.esm-bundler.js +20179 -0
  43. package/vue2/dist/index.d.ts +171 -0
  44. package/vue2/package.json +59 -0
@@ -0,0 +1,105 @@
1
+ {
2
+ "name": "@cypress/react",
3
+ "version": "0.0.0-development",
4
+ "description": "Test React components using Cypress",
5
+ "private": true,
6
+ "main": "dist/cypress-react.cjs.js",
7
+ "scripts": {
8
+ "build": "rimraf dist && rollup -c rollup.config.js",
9
+ "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
10
+ "build-prod": "yarn build",
11
+ "cy:open": "node ../../scripts/cypress.js open --component",
12
+ "cy:open:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}",
13
+ "cy:run": "node ../../scripts/cypress.js run --component",
14
+ "cy:run:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}",
15
+ "test": "yarn cy:run",
16
+ "watch": "yarn build --watch --watch.exclude ./dist/**/*"
17
+ },
18
+ "dependencies": {
19
+ "debug": "^4.3.2"
20
+ },
21
+ "devDependencies": {
22
+ "@cypress/mount-utils": "0.0.0-development",
23
+ "@rollup/plugin-commonjs": "^17.1.0",
24
+ "@rollup/plugin-node-resolve": "^11.1.1",
25
+ "@vitejs/plugin-react": "1.3.1",
26
+ "axios": "0.21.2",
27
+ "cypress": "0.0.0-development",
28
+ "cypress-plugin-snapshots": "1.4.4",
29
+ "prop-types": "15.7.2",
30
+ "react": "16.8.6",
31
+ "react-dom": "16.8.6",
32
+ "react-router": "6.0.0-alpha.1",
33
+ "react-router-dom": "6.0.0-alpha.1",
34
+ "rollup": "^2.38.5",
35
+ "rollup-plugin-typescript2": "^0.29.0",
36
+ "typescript": "^4.2.3",
37
+ "vite": "2.9.5",
38
+ "vite-plugin-require-transform": "1.0.3"
39
+ },
40
+ "peerDependencies": {
41
+ "@types/react": "^16.9.16 || ^17.0.0",
42
+ "cypress": "*",
43
+ "react": "^=16.x || ^=17.x",
44
+ "react-dom": "^=16.x || ^=17.x"
45
+ },
46
+ "files": [
47
+ "dist",
48
+ "support"
49
+ ],
50
+ "types": "dist/index.d.ts",
51
+ "license": "MIT",
52
+ "repository": {
53
+ "type": "git",
54
+ "url": "https://github.com/cypress-io/cypress.git"
55
+ },
56
+ "homepage": "https://github.com/cypress-io/cypress/blob/master/npm/react/#readme",
57
+ "author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
58
+ "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Freact&template=1-bug-report.md&title=",
59
+ "keywords": [
60
+ "react",
61
+ "cypress",
62
+ "cypress-io",
63
+ "test",
64
+ "testing"
65
+ ],
66
+ "contributors": [
67
+ {
68
+ "name": "Dmitriy Kovalenko",
69
+ "social": "@dmtrKovalenko"
70
+ },
71
+ {
72
+ "name": "Brian Mann",
73
+ "social": "@brian-mann"
74
+ },
75
+ {
76
+ "name": "Barthélémy Ledoux",
77
+ "social": "@elevatebart"
78
+ },
79
+ {
80
+ "name": "Lachlan Miller",
81
+ "social": "@lmiller1990"
82
+ },
83
+ {
84
+ "name": "Jessica Sachs",
85
+ "social": "@_JessicaSachs"
86
+ }
87
+ ],
88
+ "unpkg": "dist/cypress-react.browser.js",
89
+ "module": "dist/cypress-react.esm-bundler.js",
90
+ "peerDependenciesMeta": {
91
+ "@types/react": {
92
+ "optional": true
93
+ }
94
+ },
95
+ "publishConfig": {
96
+ "access": "public"
97
+ },
98
+ "standard": {
99
+ "globals": [
100
+ "Cypress",
101
+ "cy",
102
+ "expect"
103
+ ]
104
+ }
105
+ }
@@ -1,6 +1,6 @@
1
1
  // Type definitions for bluebird 3.5
2
2
  // Project: https://github.com/petkaantonov/bluebird
3
- // Definitions by: Leonard Hecker <https://github.com/lhecker>, thislooksfun <https://github.com/thislooksfun>
3
+ // Definitions by: Leonard Hecker <https://github.com/lhecker>
4
4
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
5
  // TypeScript Version: 3.2
6
6
 
@@ -566,7 +566,12 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
566
566
  /**
567
567
  * Same as calling `Promise.all(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
568
568
  */
569
- all<Q>(this: Bluebird<R & Iterable<Q>>): Bluebird<R>;
569
+ all<T1, T2, T3, T4, T5>(this: Bluebird<[Resolvable<T1>, Resolvable<T2>, Resolvable<T3>, Resolvable<T4>, Resolvable<T5>]>): Bluebird<[T1, T2, T3, T4, T5]>;
570
+ all<T1, T2, T3, T4>(this: Bluebird<[Resolvable<T1>, Resolvable<T2>, Resolvable<T3>, Resolvable<T4>]>): Bluebird<[T1, T2, T3, T4]>;
571
+ all<T1, T2, T3>(this: Bluebird<[Resolvable<T1>, Resolvable<T2>, Resolvable<T3>]>): Bluebird<[T1, T2, T3]>;
572
+ all<T1, T2>(this: Bluebird<[Resolvable<T1>, Resolvable<T2>]>): Bluebird<[T1, T2]>;
573
+ all<T1>(this: Bluebird<[Resolvable<T1>]>): Bluebird<[T1]>;
574
+ all<R>(this: Bluebird<Iterable<Resolvable<R>>>): Bluebird<R[]>;
570
575
 
571
576
  /**
572
577
  * Same as calling `Promise.all(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too.
@@ -688,7 +693,7 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
688
693
  * Create a promise with undecided fate and return a `PromiseResolver` to control it. See resolution?: Promise(#promise-resolution).
689
694
  * @see http://bluebirdjs.com/docs/deprecated-apis.html#promise-resolution
690
695
  */
691
- static defer<R>(): Bluebird.Resolver<R>; // tslint:disable-line no-unnecessary-generics
696
+ static defer<R>(): Bluebird.Resolver<R>;
692
697
 
693
698
  /**
694
699
  * Cast the given `value` to a trusted promise.
@@ -855,6 +860,15 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
855
860
  // array with values
856
861
  static all<R>(values: Resolvable<Iterable<Resolvable<R>>>): Bluebird<R[]>;
857
862
 
863
+ static allSettled<T1, T2, T3, T4, T5>(values: [Resolvable<T1>, Resolvable<T2>, Resolvable<T3>, Resolvable<T4>, Resolvable<T5>]): Bluebird<[Bluebird.Inspection<T1>, Bluebird.Inspection<T2>,
864
+ Bluebird.Inspection<T3>, Bluebird.Inspection<T4>, Bluebird.Inspection<T5>]>;
865
+ static allSettled<T1, T2, T3, T4>(values: [Resolvable<T1>, Resolvable<T2>, Resolvable<T3>, Resolvable<T4>]): Bluebird<[Bluebird.Inspection<T1>, Bluebird.Inspection<T2>,
866
+ Bluebird.Inspection<T3>, Bluebird.Inspection<T4>]>;
867
+ static allSettled<T1, T2, T3>(values: [Resolvable<T1>, Resolvable<T2>, Resolvable<T3>]): Bluebird<[Bluebird.Inspection<T1>, Bluebird.Inspection<T2>, Bluebird.Inspection<T3>]>;
868
+ static allSettled<T1, T2>(values: [Resolvable<T1>, Resolvable<T2>]): Bluebird<[Bluebird.Inspection<T1>, Bluebird.Inspection<T2>]>;
869
+ static allSettled<T1>(values: [Resolvable<T1>]): Bluebird<[Bluebird.Inspection<T1>]>;
870
+ static allSettled<R>(values: Resolvable<Iterable<Resolvable<R>>>): Bluebird<Array<Bluebird.Inspection<R>>>;
871
+
858
872
  /**
859
873
  * Like ``Promise.all`` but for object properties instead of array items. Returns a promise that is fulfilled when all the properties of the object are fulfilled.
860
874
  *
@@ -869,7 +883,7 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
869
883
  // map
870
884
  static props<K, V>(map: Resolvable<Map<K, Resolvable<V>>>): Bluebird<Map<K, V>>;
871
885
  // trusted promise for object
872
- static props<T>(object: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>; // tslint:disable-line:unified-signatures
886
+ static props<T>(object: PromiseLike<Bluebird.ResolvableProps<T>>): Bluebird<T>;
873
887
  // object
874
888
  static props<T>(object: Bluebird.ResolvableProps<T>): Bluebird<T>; // tslint:disable-line:unified-signatures
875
889
 
@@ -1,7 +1,7 @@
1
1
  // Cypress, cy, Log inherits EventEmitter.
2
2
  type EventEmitter2 = import("eventemitter2").EventEmitter2
3
3
 
4
- interface EventEmitter extends EventEmitter2 {
4
+ interface CyEventEmitter extends Omit<EventEmitter2, 'waitFor'> {
5
5
  proxyTo: (cy: Cypress.cy) => null
6
6
  emitMap: (eventName: string, args: any[]) => Array<(...args: any[]) => any>
7
7
  emitThen: (eventName: string, args: any[]) => Bluebird.BluebirdStatic
@@ -7,7 +7,7 @@ cy.get('button').click()
7
7
  cy.get('.result').contains('Expected text')
8
8
  ```
9
9
  */
10
- declare const cy: Cypress.cy & EventEmitter
10
+ declare const cy: Cypress.cy & CyEventEmitter
11
11
 
12
12
  /**
13
13
  * Global variable `Cypress` holds common utilities and constants.
@@ -19,4 +19,4 @@ Cypress.version // => "1.4.0"
19
19
  Cypress._ // => Lodash _
20
20
  ```
21
21
  */
22
- declare const Cypress: Cypress.Cypress & EventEmitter
22
+ declare const Cypress: Cypress.Cypress & CyEventEmitter
@@ -37,7 +37,7 @@ declare namespace CypressCommandLine {
37
37
  interface CypressRunOptions extends CypressCommonOptions {
38
38
  /**
39
39
  * Specify browser to run tests in, either by name or by filesystem path
40
- */
40
+ */
41
41
  browser: string
42
42
  /**
43
43
  * Specify a unique identifier for a run to enable grouping or parallelization
@@ -91,10 +91,6 @@ declare namespace CypressCommandLine {
91
91
  * Specify mocha reporter options
92
92
  */
93
93
  reporterOptions: any
94
- /**
95
- * Slow test threshold in milliseconds. Only affects the visual output of some reporters. For example, the spec reporter will display the test time in yellow if over the threshold.
96
- */
97
- slowTestThreshold: number
98
94
  /**
99
95
  * Specify the specs to run
100
96
  */
@@ -146,11 +142,9 @@ declare namespace CypressCommandLine {
146
142
  /**
147
143
  * Path to the config file to be used.
148
144
  *
149
- * If `false` is passed, no config file will be used.
150
- *
151
- * @default "cypress.json"
145
+ * @default "cypress.config.{js,ts,mjs,cjs}"
152
146
  */
153
- configFile: string | false
147
+ configFile: string
154
148
  /**
155
149
  * Specify environment variables.
156
150
  * TODO: isn't this duplicate of config.env?!
@@ -395,7 +389,7 @@ declare module 'cypress' {
395
389
  * @param {Cypress.ConfigOptions} config
396
390
  * @returns {Cypress.ConfigOptions} the configuration passed in parameter
397
391
  */
398
- defineConfig(config: Cypress.ConfigOptions): Cypress.ConfigOptions
392
+ defineConfig<ComponentDevServerOpts = any>(config: Cypress.ConfigOptions<ComponentDevServerOpts>): Cypress.ConfigOptions
399
393
  }
400
394
 
401
395
  // export Cypress NPM module interface