cypress 12.5.1 → 12.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,10 @@
1
+ # [@cypress/angular-v2.0.2](https://github.com/cypress-io/cypress/compare/@cypress/angular-v2.0.1...@cypress/angular-v2.0.2) (2023-02-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * mount component in [data-cy-root] ([#25807](https://github.com/cypress-io/cypress/issues/25807)) ([104eef5](https://github.com/cypress-io/cypress/commit/104eef5dfb4b619a748e7ddd59534eadb1044ae7))
7
+
1
8
  # [@cypress/angular-v2.0.1](https://github.com/cypress-io/cypress/compare/@cypress/angular-v2.0.0...@cypress/angular-v2.0.1) (2022-11-08)
2
9
 
3
10
 
@@ -1,7 +1,7 @@
1
1
  /// <reference types="cypress" />
2
2
 
3
3
  import { Type } from '@angular/core';
4
- import { TestModuleMetadata, ComponentFixture } from '@angular/core/testing';
4
+ import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@angular/core/testing';
5
5
 
6
6
  /**
7
7
  * Additional module configurations needed while mounting the component, like
@@ -72,6 +72,10 @@ declare type MountResponse<T> = {
72
72
  */
73
73
  component: T;
74
74
  };
75
+ declare class CypressTestComponentRenderer extends TestComponentRenderer {
76
+ insertRootElement(rootElId: string): void;
77
+ removeAllRootElements(): void;
78
+ }
75
79
  /**
76
80
  * Mounts an Angular component inside Cypress browser
77
81
  *
@@ -121,4 +125,4 @@ declare function mount<T>(component: Type<T> | string, config?: MountConfig<T>):
121
125
  */
122
126
  declare const createOutputSpy: <T>(alias: string) => any;
123
127
 
124
- export { MountConfig, MountResponse, createOutputSpy, mount };
128
+ export { CypressTestComponentRenderer, MountConfig, MountResponse, createOutputSpy, mount };
@@ -9,7 +9,7 @@ import 'zone.js';
9
9
  import 'zone.js/testing';
10
10
  import { CommonModule } from '@angular/common';
11
11
  import { Injectable, Component, EventEmitter, SimpleChange, ErrorHandler } from '@angular/core';
12
- import { getTestBed, TestBed } from '@angular/core/testing';
12
+ import { getTestBed, TestComponentRenderer, TestBed } from '@angular/core/testing';
13
13
  import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
14
14
 
15
15
  /******************************************************************************
@@ -46,6 +46,19 @@ function __decorate(decorators, target, key, desc) {
46
46
  return c > 3 && r && Object.defineProperty(target, key, r), r;
47
47
  }
48
48
 
49
+ const ROOT_SELECTOR = '[data-cy-root]';
50
+ /**
51
+ * Gets the root element used to mount the component.
52
+ * @returns {HTMLElement} The root element
53
+ * @throws {Error} If the root element is not found
54
+ */
55
+ const getContainerEl = () => {
56
+ const el = document.querySelector(ROOT_SELECTOR);
57
+ if (el) {
58
+ return el;
59
+ }
60
+ throw Error(`No element found that matches selector ${ROOT_SELECTOR}. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.`);
61
+ };
49
62
  /**
50
63
  * Utility function to register CT side effects and run cleanup code during the "test:before:run" Cypress hook
51
64
  * @param optionalCallback Callback to be called before the next test runs
@@ -143,6 +156,20 @@ function bootstrapModule(component, config) {
143
156
  }
144
157
  return testModuleMetaData;
145
158
  }
159
+ let CypressTestComponentRenderer = class CypressTestComponentRenderer extends TestComponentRenderer {
160
+ insertRootElement(rootElId) {
161
+ this.removeAllRootElements();
162
+ const rootElement = getContainerEl();
163
+ rootElement.setAttribute('id', rootElId);
164
+ document.body.appendChild(rootElement);
165
+ }
166
+ removeAllRootElements() {
167
+ getContainerEl().innerHTML = '';
168
+ }
169
+ };
170
+ CypressTestComponentRenderer = __decorate([
171
+ Injectable()
172
+ ], CypressTestComponentRenderer);
146
173
  /**
147
174
  * Initializes the TestBed
148
175
  *
@@ -153,6 +180,7 @@ function bootstrapModule(component, config) {
153
180
  function initTestBed(component, config) {
154
181
  const componentFixture = createComponentFixture(component);
155
182
  getTestBed().configureTestingModule(Object.assign({}, bootstrapModule(componentFixture, config)));
183
+ getTestBed().overrideProvider(TestComponentRenderer, { useValue: new CypressTestComponentRenderer() });
156
184
  return componentFixture;
157
185
  }
158
186
  let WrapperComponent = class WrapperComponent {
@@ -302,4 +330,4 @@ getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDyn
302
330
  });
303
331
  setupHooks(cleanup);
304
332
 
305
- export { createOutputSpy, mount };
333
+ export { CypressTestComponentRenderer, createOutputSpy, mount };
package/index.mjs CHANGED
@@ -8,6 +8,8 @@ export default cypress
8
8
 
9
9
  export const defineConfig = cypress.defineConfig
10
10
 
11
+ export const defineComponentFramework = cypress.defineComponentFramework
12
+
11
13
  export const run = cypress.run
12
14
 
13
15
  export const open = cypress.open
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/cypress.js CHANGED
@@ -76,6 +76,23 @@ const cypressModuleApi = {
76
76
  */
77
77
  defineConfig(config) {
78
78
  return config;
79
+ },
80
+ /**
81
+ * Provides automatic code completion for Component Frameworks Definitions.
82
+ * While it's not strictly necessary for Cypress to parse your configuration, we
83
+ * recommend wrapping your Component Framework Definition object with `defineComponentFramework()`
84
+ * @example
85
+ * module.exports = defineComponentFramework({
86
+ * type: 'cypress-ct-solid-js'
87
+ * // ...
88
+ * })
89
+ *
90
+ * @see ../types/cypress-npm-api.d.ts
91
+ * @param {Cypress.ThirdPartyComponentFrameworkDefinition} config
92
+ * @returns {Cypress.ThirdPartyComponentFrameworkDefinition} the configuration passed in parameter
93
+ */
94
+ defineComponentFramework(config) {
95
+ return config;
79
96
  }
80
97
  };
81
98
  module.exports = cypressModuleApi;
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.1",
3
+ "version": "12.7.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": "50933faac48820d9e35dce1bb217d757f484deaf",
122
- "commitDate": "2023-02-02T14:35:52.000Z",
121
+ "commitSha": "0cdd8d195f9660f1c6bb357b5fbe1ec32b16c54b",
122
+ "commitDate": "2023-02-24T22:33:04.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
  /**
@@ -393,6 +397,21 @@ declare module 'cypress' {
393
397
  * @returns {Cypress.ConfigOptions} the configuration passed in parameter
394
398
  */
395
399
  defineConfig<ComponentDevServerOpts = any>(config: Cypress.ConfigOptions<ComponentDevServerOpts>): Cypress.ConfigOptions
400
+
401
+ /**
402
+ * Provides automatic code completion for Component Frameworks Definitions.
403
+ * While it's not strictly necessary for Cypress to parse your configuration, we
404
+ * recommend wrapping your Component Framework Definition object with `defineComponentFramework()`
405
+ * @example
406
+ * module.exports = defineComponentFramework({
407
+ * type: 'cypress-ct-solid-js'
408
+ * })
409
+ *
410
+ * @see ../types/cypress-npm-api.d.ts
411
+ * @param {Cypress.ThirdPartyComponentFrameworkDefinition} config
412
+ * @returns {Cypress.ThirdPartyComponentFrameworkDefinition} the configuration passed in parameter
413
+ */
414
+ defineComponentFramework(config: Cypress.ThirdPartyComponentFrameworkDefinition): Cypress.ThirdPartyComponentFrameworkDefinition
396
415
  }
397
416
 
398
417
  // export Cypress NPM module interface
@@ -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
@@ -1801,9 +1816,21 @@ declare namespace Cypress {
1801
1816
  *
1802
1817
  * @see https://on.cypress.io/reload
1803
1818
  * @example
1819
+ * cy.visit('http://localhost:3000/admin')
1804
1820
  * cy.reload()
1805
1821
  */
1806
- reload(options?: Partial<Loggable & Timeoutable>): Chainable<AUTWindow>
1822
+ reload(): Chainable<AUTWindow>
1823
+ /**
1824
+ * Reload the page.
1825
+ *
1826
+ * @see https://on.cypress.io/reload
1827
+ * @param {Partial<Loggable & Timeoutable>} options Pass in an options object to modify the default behavior of cy.reload()
1828
+ * @example
1829
+ * // Reload the page, do not log it in the command log and timeout after 15s
1830
+ * cy.visit('http://localhost:3000/admin')
1831
+ * cy.reload({log: false, timeout: 15000})
1832
+ */
1833
+ reload(options: Partial<Loggable & Timeoutable>): Chainable<AUTWindow>
1807
1834
  /**
1808
1835
  * Reload the page without cache
1809
1836
  *
@@ -1815,6 +1842,18 @@ declare namespace Cypress {
1815
1842
  * cy.reload(true)
1816
1843
  */
1817
1844
  reload(forceReload: boolean): Chainable<AUTWindow>
1845
+ /**
1846
+ * Reload the page without cache and with log and timeout options
1847
+ *
1848
+ * @see https://on.cypress.io/reload
1849
+ * @param {Boolean} forceReload Whether to reload the current page without using the cache. true forces the reload without cache.
1850
+ * @param {Partial<Loggable & Timeoutable>} options Pass in an options object to modify the default behavior of cy.reload()
1851
+ * @example
1852
+ * // Reload the page without using the cache, do not log it in the command log and timeout after 15s
1853
+ * cy.visit('http://localhost:3000/admin')
1854
+ * cy.reload(true, {log: false, timeout: 15000})
1855
+ */
1856
+ reload(forceReload: boolean, options: Partial<Loggable & Timeoutable>): Chainable<AUTWindow>
1818
1857
 
1819
1858
  /**
1820
1859
  * Make an HTTP GET request.
@@ -3126,7 +3165,7 @@ declare namespace Cypress {
3126
3165
  */
3127
3166
  experimentalRunAllSpecs?: boolean
3128
3167
  /**
3129
- * Enables support for require/import within cy.origin.
3168
+ * Enables support for `Cypress.require()` for including dependencies within the `cy.origin()` callback.
3130
3169
  * @default false
3131
3170
  */
3132
3171
  experimentalOriginDependencies?: boolean
@@ -3244,6 +3283,179 @@ declare namespace Cypress {
3244
3283
 
3245
3284
  type PickConfigOpt<T> = T extends keyof DefineDevServerConfig ? DefineDevServerConfig[T] : any
3246
3285
 
3286
+ interface DependencyToInstall {
3287
+ dependency: CypressComponentDependency
3288
+ satisfied: boolean
3289
+ loc: string | null
3290
+ detectedVersion: string | null
3291
+ }
3292
+
3293
+ interface CypressComponentDependency {
3294
+ /**
3295
+ * Unique idenitifer.
3296
+ * @example 'reactscripts'
3297
+ */
3298
+ type: string
3299
+
3300
+ /**
3301
+ * Name to display in the user interface.
3302
+ * @example "React Scripts"
3303
+ */
3304
+ name: string
3305
+
3306
+ /**
3307
+ * Package name on npm.
3308
+ * @example react-scripts
3309
+ */
3310
+ package: string
3311
+
3312
+ /**
3313
+ * Code to run when installing. Version is optional.
3314
+ *
3315
+ * Should be <package_name>@<version>.
3316
+ *
3317
+ * @example `react`
3318
+ * @example `react@18`
3319
+ * @example `react-scripts`
3320
+ */
3321
+ installer: string
3322
+
3323
+ /**
3324
+ * Description shown in UI. It is recommended to use the same one the package uses on npm.
3325
+ * @example 'Create React apps with no build configuration'
3326
+ */
3327
+ description: string
3328
+
3329
+ /**
3330
+ * Minimum version supported. Should conform to Semantic Versioning as used in `package.json`.
3331
+ * @see https://docs.npmjs.com/cli/v9/configuring-npm/package-json#dependencies
3332
+ * @example '^=4.0.0 || ^=5.0.0'
3333
+ * @example '^2.0.0'
3334
+ */
3335
+ minVersion: string
3336
+ }
3337
+
3338
+ interface ResolvedComponentFrameworkDefinition {
3339
+ /**
3340
+ * A semantic, unique identifier.
3341
+ * Must begin with `cypress-ct-` or `@org/cypress-ct-` for third party implementations.
3342
+ * @example 'reactscripts'
3343
+ * @example 'nextjs'
3344
+ * @example 'cypress-ct-solid-js'
3345
+ */
3346
+ type: string
3347
+
3348
+ /**
3349
+ * Used as the flag for `getPreset` for meta framworks, such as finding the webpack config for CRA, Angular, etc.
3350
+ * It is also the name of the string added to `cypress.config`
3351
+ *
3352
+ * @example
3353
+ * export default {
3354
+ * component: {
3355
+ * devServer: {
3356
+ * framework: 'create-react-app' // can be 'next', 'create-react-app', etc etc.
3357
+ * }
3358
+ * }
3359
+ * }
3360
+ */
3361
+ configFramework: string
3362
+
3363
+ /**
3364
+ * Library (React, Vue) or template (aka "meta framework") (CRA, Next.js, Angular)
3365
+ */
3366
+ category: 'library' | 'template'
3367
+
3368
+ /**
3369
+ * Name displayed in Launchpad when doing initial setup.
3370
+ * @example 'Solid.js'
3371
+ * @example 'Create React App'
3372
+ */
3373
+ name: string
3374
+
3375
+ /**
3376
+ * Supported bundlers.
3377
+ */
3378
+ supportedBundlers: Array<'webpack' | 'vite'>
3379
+
3380
+ /**
3381
+ * Used to attempt to automatically select the correct framework/bundler from the dropdown.
3382
+ *
3383
+ * @example
3384
+ * const SOLID_DETECTOR: Dependency = {
3385
+ * type: 'solid',
3386
+ * name: 'Solid.js',
3387
+ * package: 'solid-js',
3388
+ * installer: 'solid-js',
3389
+ * description: 'Solid is a declarative JavaScript library for creating user interfaces',
3390
+ * minVersion: '^1.0.0',
3391
+ * }
3392
+ */
3393
+ detectors: CypressComponentDependency[]
3394
+
3395
+ /**
3396
+ * Array of required dependencies. This could be the bundler and JavaScript library.
3397
+ */
3398
+ dependencies: (bundler: 'webpack' | 'vite', projectPath: string) => Promise<DependencyToInstall[]>
3399
+
3400
+ /**
3401
+ * This is used interally by Cypress for the "Create From Component" feature.
3402
+ */
3403
+ codeGenFramework?: 'react' | 'vue' | 'svelte' | 'angular'
3404
+
3405
+ /**
3406
+ * This is used interally by Cypress for the "Create From Component" feature.
3407
+ * @example '*.{js,jsx,tsx}'
3408
+ */
3409
+ glob?: string
3410
+
3411
+ /**
3412
+ * This is the path to get mount, eg `import { mount } from <mount_module>,
3413
+ * @example: `cypress-ct-solidjs/src/mount`
3414
+ */
3415
+ mountModule: (projectPath: string) => Promise<string>
3416
+
3417
+ /**
3418
+ * Support status. Internally alpha | beta | full.
3419
+ * Community integrations are "community".
3420
+ */
3421
+ supportStatus: 'alpha' | 'beta' | 'full' | 'community'
3422
+
3423
+ /**
3424
+ * Function returning string for used for the component-index.html file.
3425
+ * Cypress provides a default if one isn't specified for third party integrations.
3426
+ */
3427
+ componentIndexHtml?: () => string
3428
+
3429
+ /**
3430
+ * Used for the Create From Comopnent feature.
3431
+ * This is currently not supported for third party frameworks.
3432
+ */
3433
+ specPattern?: '**/*.cy.ts'
3434
+ }
3435
+
3436
+ type ComponentFrameworkDefinition = Omit<ResolvedComponentFrameworkDefinition, 'dependencies'> & {
3437
+ dependencies: (bundler: 'webpack' | 'vite') => CypressComponentDependency[]
3438
+ }
3439
+
3440
+ /**
3441
+ * Certain properties are not supported for third party frameworks right now,
3442
+ * such as ones related to the "Create From" feature. This is a subset of
3443
+ * properties that are exposed for public usage.
3444
+ */
3445
+
3446
+ type ThirdPartyComponentFrameworkDefinition = Pick<ComponentFrameworkDefinition, 'type' | 'name' | 'supportedBundlers' | 'detectors' | 'dependencies'> & {
3447
+ /**
3448
+ * @example `cypress-ct-${string} for third parties. Any string is valid internally.
3449
+ */
3450
+ type: string
3451
+
3452
+ /**
3453
+ * Raw SVG icon that will be displayed in the Project Setup Wizard. Used for third parties that
3454
+ * want to render a custom icon.
3455
+ */
3456
+ icon?: string
3457
+ }
3458
+
3247
3459
  interface AngularDevServerProjectConfig {
3248
3460
  root: string
3249
3461
  sourceRoot: string
@@ -3530,12 +3742,49 @@ declare namespace Cypress {
3530
3742
  action: 'select' | 'drag-drop'
3531
3743
  }
3532
3744
 
3745
+ /**
3746
+ * Options that control how the `cy.setCookie` command
3747
+ * sets the cookie in the browser.
3748
+ * @see https://on.cypress.io/setcookie#Arguments
3749
+ */
3533
3750
  interface SetCookieOptions extends Loggable, Timeoutable {
3751
+ /**
3752
+ * The path of the cookie.
3753
+ * @default "/"
3754
+ */
3534
3755
  path: string
3756
+ /**
3757
+ * Represents the domain the cookie belongs to (e.g. "docs.cypress.io", "github.com").
3758
+ * @default location.hostname
3759
+ */
3535
3760
  domain: string
3761
+ /**
3762
+ * Whether a cookie's scope is limited to secure channels, such as HTTPS.
3763
+ * @default false
3764
+ */
3536
3765
  secure: boolean
3766
+ /**
3767
+ * Whether or not the cookie is HttpOnly, meaning the cookie is inaccessible to client-side scripts.
3768
+ * The Cypress cookie API has access to HttpOnly cookies.
3769
+ * @default false
3770
+ */
3537
3771
  httpOnly: boolean
3772
+ /**
3773
+ * Whether or not the cookie is a host-only cookie, meaning the request's host must exactly match the domain of the cookie.
3774
+ * @default false
3775
+ */
3776
+ hostOnly: boolean
3777
+ /**
3778
+ * The cookie's expiry time, specified in seconds since Unix Epoch.
3779
+ * The default is expiry is 20 years in the future from current time.
3780
+ */
3538
3781
  expiry: number
3782
+ /**
3783
+ * The cookie's SameSite value. If set, should be one of `lax`, `strict`, or `no_restriction`.
3784
+ * `no_restriction` is the equivalent of `SameSite=None`. Pass `undefined` to use the browser's default.
3785
+ * Note: `no_restriction` can only be used if the secure flag is set to `true`.
3786
+ * @default undefined
3787
+ */
3539
3788
  sameSite: SameSiteStatus
3540
3789
  }
3541
3790
 
@@ -5776,6 +6025,7 @@ declare namespace Cypress {
5776
6025
  specPattern?: string[]
5777
6026
  system: SystemDetails
5778
6027
  tag?: string
6028
+ autoCancelAfterFailures?: number | false
5779
6029
  }
5780
6030
 
5781
6031
  interface DevServerConfig {
@@ -6064,6 +6314,7 @@ declare namespace Cypress {
6064
6314
  value: string
6065
6315
  path: string
6066
6316
  domain: string
6317
+ hostOnly?: boolean
6067
6318
  httpOnly: boolean
6068
6319
  secure: boolean
6069
6320
  expiry?: number
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",