cypress 12.5.0 → 12.6.0

Sign up to get free protection for your applications and to get access to all the features.
package/lib/cli.js CHANGED
@@ -83,6 +83,7 @@ const parseVariableOpts = (fnArgs, args) => {
83
83
  return util.parseOpts(opts);
84
84
  };
85
85
  const descriptions = {
86
+ autoCancelAfterFailures: 'overrides the project-level Cloud configuration to set the failed test threshold for auto cancellation or to disable auto cancellation when recording to the Cloud',
86
87
  browser: 'runs Cypress in the browser with the given name. if a filesystem path is supplied, Cypress will attempt to use the browser at that path.',
87
88
  cacheClear: 'delete all cached binaries',
88
89
  cachePrune: 'deletes all cached binaries except for the version currently in use',
@@ -182,7 +183,7 @@ const createProgram = () => {
182
183
  return program;
183
184
  };
184
185
  const addCypressRunCommand = program => {
185
- return program.command('run').usage('[options]').description('Runs Cypress tests from the CLI without the GUI').option('-b, --browser <browser-name-or-path>', text('browser')).option('--ci-build-id <id>', text('ciBuildId')).option('--component', text('component')).option('-c, --config <config>', text('config')).option('-C, --config-file <config-file>', text('configFile')).option('--e2e', text('e2e')).option('-e, --env <env>', text('env')).option('--group <name>', text('group')).option('-k, --key <record-key>', text('key')).option('--headed', text('headed')).option('--headless', text('headless')).option('--no-exit', text('exit')).option('--parallel', text('parallel')).option('-p, --port <port>', text('port')).option('-P, --project <project-path>', text('project')).option('-q, --quiet', text('quiet')).option('--record [bool]', text('record'), coerceFalse).option('-r, --reporter <reporter>', text('reporter')).option('-o, --reporter-options <reporter-options>', text('reporterOptions')).option('-s, --spec <spec>', text('spec')).option('-t, --tag <tag>', text('tag')).option('--dev', text('dev'), coerceFalse);
186
+ return program.command('run').usage('[options]').description('Runs Cypress tests from the CLI without the GUI').option('--auto-cancel-after-failures <test-failure-count || false>', text('autoCancelAfterFailures')).option('-b, --browser <browser-name-or-path>', text('browser')).option('--ci-build-id <id>', text('ciBuildId')).option('--component', text('component')).option('-c, --config <config>', text('config')).option('-C, --config-file <config-file>', text('configFile')).option('--e2e', text('e2e')).option('-e, --env <env>', text('env')).option('--group <name>', text('group')).option('-k, --key <record-key>', text('key')).option('--headed', text('headed')).option('--headless', text('headless')).option('--no-exit', text('exit')).option('--parallel', text('parallel')).option('-p, --port <port>', text('port')).option('-P, --project <project-path>', text('project')).option('-q, --quiet', text('quiet')).option('--record [bool]', text('record'), coerceFalse).option('-r, --reporter <reporter>', text('reporter')).option('-o, --reporter-options <reporter-options>', text('reporterOptions')).option('-s, --spec <spec>', text('spec')).option('-t, --tag <tag>', text('tag')).option('--dev', text('dev'), coerceFalse);
186
187
  };
187
188
  const addCypressOpenCommand = program => {
188
189
  return program.command('open').usage('[options]').description('Opens Cypress in the interactive GUI.').option('-b, --browser <browser-path>', text('browser')).option('--component', text('component')).option('-c, --config <config>', text('config')).option('-C, --config-file <config-file>', text('configFile')).option('-d, --detached [bool]', text('detached'), coerceFalse).option('--e2e', text('e2e')).option('-e, --env <env>', text('env')).option('--global', text('global')).option('-p, --port <port>', text('port')).option('-P, --project <project-path>', text('project')).option('--dev', text('dev'), coerceFalse);
package/lib/exec/run.js CHANGED
@@ -49,6 +49,9 @@ const processRunOptions = (options = {}) => {
49
49
  return throwInvalidOptionError(errors.invalidRunProjectPath);
50
50
  }
51
51
  const args = ['--run-project', options.project];
52
+ if (options.autoCancelAfterFailures || options.autoCancelAfterFailures === 0 || options.autoCancelAfterFailures === false) {
53
+ args.push('--auto-cancel-after-failures', options.autoCancelAfterFailures);
54
+ }
52
55
  if (options.browser) {
53
56
  args.push('--browser', options.browser);
54
57
  }
package/lib/util.js CHANGED
@@ -170,7 +170,7 @@ const dequote = str => {
170
170
  return str;
171
171
  };
172
172
  const parseOpts = opts => {
173
- opts = _.pick(opts, 'browser', 'cachePath', 'cacheList', 'cacheClear', 'cachePrune', 'ciBuildId', 'ct', 'component', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'e2e', 'exit', 'env', 'force', 'global', 'group', 'headed', 'headless', 'inspect', 'inspectBrk', 'key', 'path', 'parallel', 'port', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'runProject', 'spec', 'tag');
173
+ opts = _.pick(opts, 'autoCancelAfterFailures', 'browser', 'cachePath', 'cacheList', 'cacheClear', 'cachePrune', 'ciBuildId', 'ct', 'component', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'e2e', 'exit', 'env', 'force', 'global', 'group', 'headed', 'headless', 'inspect', 'inspectBrk', 'key', 'path', 'parallel', 'port', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'runProject', 'spec', 'tag');
174
174
  if (opts.exit) {
175
175
  opts = _.omit(opts, 'exit');
176
176
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "12.5.0",
3
+ "version": "12.6.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node index.js --exec install",
@@ -24,7 +24,7 @@
24
24
  "commander": "^5.1.0",
25
25
  "common-tags": "^1.8.0",
26
26
  "dayjs": "^1.10.4",
27
- "debug": "^4.3.2",
27
+ "debug": "^4.3.4",
28
28
  "enquirer": "^2.3.6",
29
29
  "eventemitter2": "6.4.7",
30
30
  "execa": "4.1.0",
@@ -118,8 +118,8 @@
118
118
  },
119
119
  "buildInfo": {
120
120
  "commitBranch": "develop",
121
- "commitSha": "a3858d7d59e7299feb047e0f9444c27f71b3bed0",
122
- "commitDate": "2023-01-31T19:18:27.000Z",
121
+ "commitSha": "9e27540f0547163a8ec745da2d66ce455683187c",
122
+ "commitDate": "2023-02-15T14:25:30.000Z",
123
123
  "stable": true
124
124
  },
125
125
  "description": "Cypress is a next generation front end testing tool built for the modern web",
@@ -4,6 +4,13 @@
4
4
  import React__default from 'react';
5
5
  import * as react_dom from 'react-dom';
6
6
 
7
+ /**
8
+ * Gets the root element used to mount the component.
9
+ * @returns {HTMLElement} The root element
10
+ * @throws {Error} If the root element is not found
11
+ */
12
+ declare const getContainerEl: () => HTMLElement;
13
+
7
14
  interface UnmountArgs {
8
15
  log: boolean;
9
16
  boundComponentMessage?: string;
@@ -41,13 +48,6 @@ interface MountReturn {
41
48
  unmount: (payload: UnmountArgs) => void;
42
49
  }
43
50
 
44
- /**
45
- * Gets the root element used to mount the component.
46
- * @returns {HTMLElement} The root element
47
- * @throws {Error} If the root element is not found
48
- */
49
- declare const getContainerEl: () => HTMLElement;
50
-
51
51
  /**
52
52
  * Mounts a React component into the DOM.
53
53
  * @param {import('react').JSX.Element} jsx The React component to mount.
@@ -75,4 +75,4 @@ declare function mount(jsx: React__default.ReactNode, options?: MountOptions, re
75
75
  */
76
76
  declare function unmount(options?: UnmountArgs): void;
77
77
 
78
- export { getContainerEl, mount, unmount };
78
+ export { MountOptions, MountReturn, getContainerEl, mount, unmount };
@@ -95,6 +95,10 @@ declare namespace CypressCommandLine {
95
95
  * Specify the specs to run
96
96
  */
97
97
  spec: string
98
+ /**
99
+ * Specify the number of failures to cancel a run being recorded to the Cloud or false to disable auto-cancellation.
100
+ */
101
+ autoCancelAfterFailures: number | false
98
102
  }
99
103
 
100
104
  /**
@@ -53,6 +53,9 @@ declare namespace Cypress {
53
53
  interface QueryFn<T extends keyof ChainableMethods> {
54
54
  (this: Command, ...args: Parameters<ChainableMethods[T]>): (subject: any) => any
55
55
  }
56
+ interface QueryFnWithOriginalFn<T extends keyof Chainable> {
57
+ (this: Command, originalFn: QueryFn<T>, ...args: Parameters<ChainableMethods[T]>): (subject: any) => any
58
+ }
56
59
  interface ObjectLike {
57
60
  [key: string]: any
58
61
  }
@@ -648,6 +651,12 @@ declare namespace Cypress {
648
651
  * @see https://on.cypress.io/api/custom-queries
649
652
  */
650
653
  addQuery<T extends keyof Chainable>(name: T, fn: QueryFn<T>): void
654
+
655
+ /**
656
+ * Overwrite an existing Cypress query with a new implementation
657
+ * @see https://on.cypress.io/api/custom-queries
658
+ */
659
+ overwriteQuery<T extends keyof Chainable>(name: T, fn: QueryFnWithOriginalFn<T>): void
651
660
  }
652
661
 
653
662
  /**
@@ -786,6 +795,12 @@ declare namespace Cypress {
786
795
  */
787
796
  off: Actions
788
797
 
798
+ /**
799
+ * Used to include dependencies within the cy.origin() callback
800
+ * @see https://on.cypress.io/origin
801
+ */
802
+ require: <T = any>(id: string) => T
803
+
789
804
  /**
790
805
  * Trigger action
791
806
  * @private
@@ -793,7 +808,7 @@ declare namespace Cypress {
793
808
  action: (action: string, ...args: any[]) => any[] | void
794
809
 
795
810
  /**
796
- * Load files
811
+ * Load files
797
812
  * @private
798
813
  */
799
814
  onSpecWindow: (window: Window, specList: string[] | Array<() => Promise<void>>) => void
@@ -3126,7 +3141,7 @@ declare namespace Cypress {
3126
3141
  */
3127
3142
  experimentalRunAllSpecs?: boolean
3128
3143
  /**
3129
- * Enables support for require/import within cy.origin.
3144
+ * Enables support for `Cypress.require()` for including dependencies within the `cy.origin()` callback.
3130
3145
  * @default false
3131
3146
  */
3132
3147
  experimentalOriginDependencies?: boolean
@@ -5776,6 +5791,7 @@ declare namespace Cypress {
5776
5791
  specPattern?: string[]
5777
5792
  system: SystemDetails
5778
5793
  tag?: string
5794
+ autoCancelAfterFailures?: number | false
5779
5795
  }
5780
5796
 
5781
5797
  interface DevServerConfig {
@@ -5976,14 +5992,14 @@ declare namespace Cypress {
5976
5992
  * Useful to see how internal cypress commands utilize the {% url 'Cypress.log()' cypress-log %} API.
5977
5993
  * @see https://on.cypress.io/catalog-of-events#App-Events
5978
5994
  */
5979
- (action: 'log:added', fn: (log: any, interactive: boolean) => void): Cypress
5995
+ (action: 'log:added', fn: (attributes: ObjectLike, log: any) => void): Cypress
5980
5996
  /**
5981
5997
  * Fires whenever a command's attributes changes.
5982
5998
  * This event is debounced to prevent it from firing too quickly and too often.
5983
5999
  * Useful to see how internal cypress commands utilize the {% url 'Cypress.log()' cypress-log %} API.
5984
6000
  * @see https://on.cypress.io/catalog-of-events#App-Events
5985
6001
  */
5986
- (action: 'log:changed', fn: (log: any, interactive: boolean) => void): Cypress
6002
+ (action: 'log:changed', fn: (attributes: ObjectLike, log: any) => void): Cypress
5987
6003
  /**
5988
6004
  * Fires before the test and all **before** and **beforeEach** hooks run.
5989
6005
  * @see https://on.cypress.io/catalog-of-events#App-Events
package/vue/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ # [@cypress/vue-v5.0.4](https://github.com/cypress-io/cypress/compare/@cypress/vue-v5.0.3...@cypress/vue-v5.0.4) (2023-02-06)
2
+
1
3
  # [@cypress/vue-v5.0.3](https://github.com/cypress-io/cypress/compare/@cypress/vue-v5.0.2...@cypress/vue-v5.0.3) (2022-12-02)
2
4
 
3
5
 
package/vue/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "@vue/test-utils": "2.0.2",
24
24
  "axios": "0.21.2",
25
25
  "cypress": "0.0.0-development",
26
- "debug": "^4.3.2",
26
+ "debug": "^4.3.4",
27
27
  "globby": "^11.0.1",
28
28
  "tailwindcss": "1.1.4",
29
29
  "typescript": "^4.7.4",