cypress 13.11.0 → 13.13.0

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.
Files changed (62) hide show
  1. package/angular/angular/dist/index.d.ts +1 -2
  2. package/angular/angular/dist/index.js +239 -239
  3. package/angular/angular/package.json +1 -1
  4. package/angular/dist/index.d.ts +1 -2
  5. package/angular/dist/index.js +239 -239
  6. package/angular/package.json +1 -1
  7. package/angular-signals/README.md +11 -0
  8. package/angular-signals/angular-signals/README.md +11 -0
  9. package/angular-signals/angular-signals/dist/index.d.ts +136 -0
  10. package/angular-signals/angular-signals/dist/index.js +1861 -0
  11. package/angular-signals/angular-signals/package.json +74 -0
  12. package/angular-signals/dist/index.d.ts +136 -0
  13. package/angular-signals/dist/index.js +1861 -0
  14. package/angular-signals/package.json +74 -0
  15. package/lib/cli.js +0 -1
  16. package/lib/exec/xvfb.js +0 -1
  17. package/lib/logger.js +0 -3
  18. package/mount-utils/dist/index.d.ts +1 -1
  19. package/mount-utils/mount-utils/dist/index.d.ts +1 -1
  20. package/mount-utils/mount-utils/package.json +1 -1
  21. package/mount-utils/package.json +1 -1
  22. package/package.json +11 -5
  23. package/react/dist/cypress-react.cjs.js +237 -237
  24. package/react/dist/cypress-react.esm-bundler.js +237 -237
  25. package/react/dist/index.d.ts +1 -1
  26. package/react/package.json +3 -3
  27. package/react/react/dist/cypress-react.cjs.js +237 -237
  28. package/react/react/dist/cypress-react.esm-bundler.js +237 -237
  29. package/react/react/dist/index.d.ts +1 -1
  30. package/react/react/package.json +3 -3
  31. package/react18/dist/cypress-react.cjs.js +222 -222
  32. package/react18/dist/cypress-react.esm-bundler.js +222 -222
  33. package/react18/dist/index.d.ts +1 -1
  34. package/react18/package.json +1 -1
  35. package/react18/react18/dist/cypress-react.cjs.js +222 -222
  36. package/react18/react18/dist/cypress-react.esm-bundler.js +222 -222
  37. package/react18/react18/dist/index.d.ts +1 -1
  38. package/react18/react18/package.json +1 -1
  39. package/svelte/dist/cypress-svelte.cjs.js +61 -61
  40. package/svelte/dist/cypress-svelte.esm-bundler.js +61 -61
  41. package/svelte/dist/index.d.ts +2 -2
  42. package/svelte/package.json +1 -1
  43. package/svelte/svelte/dist/cypress-svelte.cjs.js +61 -61
  44. package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +61 -61
  45. package/svelte/svelte/dist/index.d.ts +2 -2
  46. package/svelte/svelte/package.json +1 -1
  47. package/vue/dist/cypress-vue.cjs.js +128 -128
  48. package/vue/dist/cypress-vue.esm-bundler.js +128 -128
  49. package/vue/dist/index.d.ts +5 -5
  50. package/vue/package.json +5 -5
  51. package/vue/vue/dist/cypress-vue.cjs.js +128 -128
  52. package/vue/vue/dist/cypress-vue.esm-bundler.js +128 -128
  53. package/vue/vue/dist/index.d.ts +5 -5
  54. package/vue/vue/package.json +5 -5
  55. package/vue2/dist/cypress-vue2.cjs.js +211 -211
  56. package/vue2/dist/cypress-vue2.esm-bundler.js +211 -211
  57. package/vue2/dist/index.d.ts +11 -11
  58. package/vue2/package.json +1 -1
  59. package/vue2/vue2/dist/cypress-vue2.cjs.js +211 -211
  60. package/vue2/vue2/dist/cypress-vue2.esm-bundler.js +211 -211
  61. package/vue2/vue2/dist/index.d.ts +11 -11
  62. package/vue2/vue2/package.json +1 -1
@@ -54,67 +54,67 @@ function setupHooks(optionalCallback) {
54
54
  });
55
55
  }
56
56
 
57
- const DEFAULT_COMP_NAME = 'unknown';
58
- let componentInstance;
59
- const cleanup = () => {
60
- componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.$destroy();
61
- };
62
- // Extract the component name from the object passed to mount
63
- const getComponentDisplayName = (Component) => {
64
- if (Component.name) {
65
- const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
66
- return match || Component.name;
67
- }
68
- return DEFAULT_COMP_NAME;
69
- };
70
- /**
71
- * Mounts a Svelte component inside the Cypress browser
72
- *
73
- * @param {SvelteConstructor<T>} Component Svelte component being mounted
74
- * @param {MountReturn<T extends SvelteComponent>} options options to customize the component being mounted
75
- * @returns Cypress.Chainable<MountReturn>
76
- *
77
- * @example
78
- * import Counter from './Counter.svelte'
79
- * import { mount } from 'cypress/svelte'
80
- *
81
- * it('should render', () => {
82
- * mount(Counter, { props: { count: 42 } })
83
- * cy.get('button').contains(42)
84
- * })
85
- *
86
- * @see {@link https://on.cypress.io/mounting-svelte} for more details.
87
- */
88
- function mount(Component, options = {}) {
89
- checkForRemovedStyleOptions(options);
90
- return cy.then(() => {
91
- // Remove last mounted component if cy.mount is called more than once in a test
92
- cleanup();
93
- const target = getContainerEl();
94
- const ComponentConstructor = (Component.default || Component);
95
- componentInstance = new ComponentConstructor(Object.assign({ target }, options));
96
- // by waiting, we are delaying test execution for the next tick of event loop
97
- // and letting hooks and component lifecycle methods to execute mount
98
- return cy.wait(0, { log: false }).then(() => {
99
- if (options.log !== false) {
100
- const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
101
- Cypress.log({
102
- name: 'mount',
103
- message: [mountMessage],
104
- });
105
- }
106
- })
107
- .wrap({ component: componentInstance }, { log: false });
108
- });
109
- }
110
- // Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
111
- // by creating an explicit function/import that the user can register in their 'component.js' support file,
112
- // such as:
113
- // import 'cypress/<my-framework>/support'
114
- // or
115
- // import { registerCT } from 'cypress/<my-framework>'
116
- // registerCT()
117
- // Note: This would be a breaking change
57
+ const DEFAULT_COMP_NAME = 'unknown';
58
+ let componentInstance;
59
+ const cleanup = () => {
60
+ componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.$destroy();
61
+ };
62
+ // Extract the component name from the object passed to mount
63
+ const getComponentDisplayName = (Component) => {
64
+ if (Component.name) {
65
+ const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
66
+ return match || Component.name;
67
+ }
68
+ return DEFAULT_COMP_NAME;
69
+ };
70
+ /**
71
+ * Mounts a Svelte component inside the Cypress browser
72
+ *
73
+ * @param {SvelteConstructor<T>} Component Svelte component being mounted
74
+ * @param {MountReturn<T extends SvelteComponent>} options options to customize the component being mounted
75
+ * @returns Cypress.Chainable<MountReturn>
76
+ *
77
+ * @example
78
+ * import Counter from './Counter.svelte'
79
+ * import { mount } from 'cypress/svelte'
80
+ *
81
+ * it('should render', () => {
82
+ * mount(Counter, { props: { count: 42 } })
83
+ * cy.get('button').contains(42)
84
+ * })
85
+ *
86
+ * @see {@link https://on.cypress.io/mounting-svelte} for more details.
87
+ */
88
+ function mount(Component, options = {}) {
89
+ checkForRemovedStyleOptions(options);
90
+ return cy.then(() => {
91
+ // Remove last mounted component if cy.mount is called more than once in a test
92
+ cleanup();
93
+ const target = getContainerEl();
94
+ const ComponentConstructor = (Component.default || Component);
95
+ componentInstance = new ComponentConstructor(Object.assign({ target }, options));
96
+ // by waiting, we are delaying test execution for the next tick of event loop
97
+ // and letting hooks and component lifecycle methods to execute mount
98
+ return cy.wait(0, { log: false }).then(() => {
99
+ if (options.log !== false) {
100
+ const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
101
+ Cypress.log({
102
+ name: 'mount',
103
+ message: [mountMessage],
104
+ });
105
+ }
106
+ })
107
+ .wrap({ component: componentInstance }, { log: false });
108
+ });
109
+ }
110
+ // Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
111
+ // by creating an explicit function/import that the user can register in their 'component.js' support file,
112
+ // such as:
113
+ // import 'cypress/<my-framework>/support'
114
+ // or
115
+ // import { registerCT } from 'cypress/<my-framework>'
116
+ // registerCT()
117
+ // Note: This would be a breaking change
118
118
  setupHooks(cleanup);
119
119
 
120
120
  export { mount };
@@ -170,8 +170,8 @@ declare class SvelteComponentTyped<Props extends Record<string, any> = any, Even
170
170
  */
171
171
  declare type ComponentProps<Component extends SvelteComponent> = Component extends SvelteComponentTyped<infer Props> ? Props : never;
172
172
 
173
- declare type SvelteConstructor<T> = new (...args: any[]) => T;
174
- declare type SvelteComponentOptions<T extends SvelteComponentDev$1> = Omit<ComponentConstructorOptions<ComponentProps<T>>, 'hydrate' | 'target' | '$$inline'>;
173
+ type SvelteConstructor<T> = new (...args: any[]) => T;
174
+ type SvelteComponentOptions<T extends SvelteComponentDev$1> = Omit<ComponentConstructorOptions<ComponentProps<T>>, 'hydrate' | 'target' | '$$inline'>;
175
175
  interface MountOptions<T extends SvelteComponentDev$1> extends SvelteComponentOptions<T> {
176
176
  log?: boolean;
177
177
  }
@@ -13,7 +13,7 @@
13
13
  "devDependencies": {
14
14
  "@cypress/mount-utils": "0.0.0-development",
15
15
  "svelte": "^3.49.0",
16
- "typescript": "^4.7.4"
16
+ "typescript": "^5.4.5"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "cypress": ">=10.6.0",
@@ -56,67 +56,67 @@ function setupHooks(optionalCallback) {
56
56
  });
57
57
  }
58
58
 
59
- const DEFAULT_COMP_NAME = 'unknown';
60
- let componentInstance;
61
- const cleanup = () => {
62
- componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.$destroy();
63
- };
64
- // Extract the component name from the object passed to mount
65
- const getComponentDisplayName = (Component) => {
66
- if (Component.name) {
67
- const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
68
- return match || Component.name;
69
- }
70
- return DEFAULT_COMP_NAME;
71
- };
72
- /**
73
- * Mounts a Svelte component inside the Cypress browser
74
- *
75
- * @param {SvelteConstructor<T>} Component Svelte component being mounted
76
- * @param {MountReturn<T extends SvelteComponent>} options options to customize the component being mounted
77
- * @returns Cypress.Chainable<MountReturn>
78
- *
79
- * @example
80
- * import Counter from './Counter.svelte'
81
- * import { mount } from 'cypress/svelte'
82
- *
83
- * it('should render', () => {
84
- * mount(Counter, { props: { count: 42 } })
85
- * cy.get('button').contains(42)
86
- * })
87
- *
88
- * @see {@link https://on.cypress.io/mounting-svelte} for more details.
89
- */
90
- function mount(Component, options = {}) {
91
- checkForRemovedStyleOptions(options);
92
- return cy.then(() => {
93
- // Remove last mounted component if cy.mount is called more than once in a test
94
- cleanup();
95
- const target = getContainerEl();
96
- const ComponentConstructor = (Component.default || Component);
97
- componentInstance = new ComponentConstructor(Object.assign({ target }, options));
98
- // by waiting, we are delaying test execution for the next tick of event loop
99
- // and letting hooks and component lifecycle methods to execute mount
100
- return cy.wait(0, { log: false }).then(() => {
101
- if (options.log !== false) {
102
- const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
103
- Cypress.log({
104
- name: 'mount',
105
- message: [mountMessage],
106
- });
107
- }
108
- })
109
- .wrap({ component: componentInstance }, { log: false });
110
- });
111
- }
112
- // Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
113
- // by creating an explicit function/import that the user can register in their 'component.js' support file,
114
- // such as:
115
- // import 'cypress/<my-framework>/support'
116
- // or
117
- // import { registerCT } from 'cypress/<my-framework>'
118
- // registerCT()
119
- // Note: This would be a breaking change
59
+ const DEFAULT_COMP_NAME = 'unknown';
60
+ let componentInstance;
61
+ const cleanup = () => {
62
+ componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.$destroy();
63
+ };
64
+ // Extract the component name from the object passed to mount
65
+ const getComponentDisplayName = (Component) => {
66
+ if (Component.name) {
67
+ const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
68
+ return match || Component.name;
69
+ }
70
+ return DEFAULT_COMP_NAME;
71
+ };
72
+ /**
73
+ * Mounts a Svelte component inside the Cypress browser
74
+ *
75
+ * @param {SvelteConstructor<T>} Component Svelte component being mounted
76
+ * @param {MountReturn<T extends SvelteComponent>} options options to customize the component being mounted
77
+ * @returns Cypress.Chainable<MountReturn>
78
+ *
79
+ * @example
80
+ * import Counter from './Counter.svelte'
81
+ * import { mount } from 'cypress/svelte'
82
+ *
83
+ * it('should render', () => {
84
+ * mount(Counter, { props: { count: 42 } })
85
+ * cy.get('button').contains(42)
86
+ * })
87
+ *
88
+ * @see {@link https://on.cypress.io/mounting-svelte} for more details.
89
+ */
90
+ function mount(Component, options = {}) {
91
+ checkForRemovedStyleOptions(options);
92
+ return cy.then(() => {
93
+ // Remove last mounted component if cy.mount is called more than once in a test
94
+ cleanup();
95
+ const target = getContainerEl();
96
+ const ComponentConstructor = (Component.default || Component);
97
+ componentInstance = new ComponentConstructor(Object.assign({ target }, options));
98
+ // by waiting, we are delaying test execution for the next tick of event loop
99
+ // and letting hooks and component lifecycle methods to execute mount
100
+ return cy.wait(0, { log: false }).then(() => {
101
+ if (options.log !== false) {
102
+ const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
103
+ Cypress.log({
104
+ name: 'mount',
105
+ message: [mountMessage],
106
+ });
107
+ }
108
+ })
109
+ .wrap({ component: componentInstance }, { log: false });
110
+ });
111
+ }
112
+ // Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
113
+ // by creating an explicit function/import that the user can register in their 'component.js' support file,
114
+ // such as:
115
+ // import 'cypress/<my-framework>/support'
116
+ // or
117
+ // import { registerCT } from 'cypress/<my-framework>'
118
+ // registerCT()
119
+ // Note: This would be a breaking change
120
120
  setupHooks(cleanup);
121
121
 
122
122
  exports.mount = mount;
@@ -54,67 +54,67 @@ function setupHooks(optionalCallback) {
54
54
  });
55
55
  }
56
56
 
57
- const DEFAULT_COMP_NAME = 'unknown';
58
- let componentInstance;
59
- const cleanup = () => {
60
- componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.$destroy();
61
- };
62
- // Extract the component name from the object passed to mount
63
- const getComponentDisplayName = (Component) => {
64
- if (Component.name) {
65
- const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
66
- return match || Component.name;
67
- }
68
- return DEFAULT_COMP_NAME;
69
- };
70
- /**
71
- * Mounts a Svelte component inside the Cypress browser
72
- *
73
- * @param {SvelteConstructor<T>} Component Svelte component being mounted
74
- * @param {MountReturn<T extends SvelteComponent>} options options to customize the component being mounted
75
- * @returns Cypress.Chainable<MountReturn>
76
- *
77
- * @example
78
- * import Counter from './Counter.svelte'
79
- * import { mount } from 'cypress/svelte'
80
- *
81
- * it('should render', () => {
82
- * mount(Counter, { props: { count: 42 } })
83
- * cy.get('button').contains(42)
84
- * })
85
- *
86
- * @see {@link https://on.cypress.io/mounting-svelte} for more details.
87
- */
88
- function mount(Component, options = {}) {
89
- checkForRemovedStyleOptions(options);
90
- return cy.then(() => {
91
- // Remove last mounted component if cy.mount is called more than once in a test
92
- cleanup();
93
- const target = getContainerEl();
94
- const ComponentConstructor = (Component.default || Component);
95
- componentInstance = new ComponentConstructor(Object.assign({ target }, options));
96
- // by waiting, we are delaying test execution for the next tick of event loop
97
- // and letting hooks and component lifecycle methods to execute mount
98
- return cy.wait(0, { log: false }).then(() => {
99
- if (options.log !== false) {
100
- const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
101
- Cypress.log({
102
- name: 'mount',
103
- message: [mountMessage],
104
- });
105
- }
106
- })
107
- .wrap({ component: componentInstance }, { log: false });
108
- });
109
- }
110
- // Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
111
- // by creating an explicit function/import that the user can register in their 'component.js' support file,
112
- // such as:
113
- // import 'cypress/<my-framework>/support'
114
- // or
115
- // import { registerCT } from 'cypress/<my-framework>'
116
- // registerCT()
117
- // Note: This would be a breaking change
57
+ const DEFAULT_COMP_NAME = 'unknown';
58
+ let componentInstance;
59
+ const cleanup = () => {
60
+ componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.$destroy();
61
+ };
62
+ // Extract the component name from the object passed to mount
63
+ const getComponentDisplayName = (Component) => {
64
+ if (Component.name) {
65
+ const [, match] = /Proxy\<(\w+)\>/.exec(Component.name) || [];
66
+ return match || Component.name;
67
+ }
68
+ return DEFAULT_COMP_NAME;
69
+ };
70
+ /**
71
+ * Mounts a Svelte component inside the Cypress browser
72
+ *
73
+ * @param {SvelteConstructor<T>} Component Svelte component being mounted
74
+ * @param {MountReturn<T extends SvelteComponent>} options options to customize the component being mounted
75
+ * @returns Cypress.Chainable<MountReturn>
76
+ *
77
+ * @example
78
+ * import Counter from './Counter.svelte'
79
+ * import { mount } from 'cypress/svelte'
80
+ *
81
+ * it('should render', () => {
82
+ * mount(Counter, { props: { count: 42 } })
83
+ * cy.get('button').contains(42)
84
+ * })
85
+ *
86
+ * @see {@link https://on.cypress.io/mounting-svelte} for more details.
87
+ */
88
+ function mount(Component, options = {}) {
89
+ checkForRemovedStyleOptions(options);
90
+ return cy.then(() => {
91
+ // Remove last mounted component if cy.mount is called more than once in a test
92
+ cleanup();
93
+ const target = getContainerEl();
94
+ const ComponentConstructor = (Component.default || Component);
95
+ componentInstance = new ComponentConstructor(Object.assign({ target }, options));
96
+ // by waiting, we are delaying test execution for the next tick of event loop
97
+ // and letting hooks and component lifecycle methods to execute mount
98
+ return cy.wait(0, { log: false }).then(() => {
99
+ if (options.log !== false) {
100
+ const mountMessage = `<${getComponentDisplayName(Component)} ... />`;
101
+ Cypress.log({
102
+ name: 'mount',
103
+ message: [mountMessage],
104
+ });
105
+ }
106
+ })
107
+ .wrap({ component: componentInstance }, { log: false });
108
+ });
109
+ }
110
+ // Side effects from "import { mount } from '@cypress/<my-framework>'" are annoying, we should avoid doing this
111
+ // by creating an explicit function/import that the user can register in their 'component.js' support file,
112
+ // such as:
113
+ // import 'cypress/<my-framework>/support'
114
+ // or
115
+ // import { registerCT } from 'cypress/<my-framework>'
116
+ // registerCT()
117
+ // Note: This would be a breaking change
118
118
  setupHooks(cleanup);
119
119
 
120
120
  export { mount };
@@ -170,8 +170,8 @@ declare class SvelteComponentTyped<Props extends Record<string, any> = any, Even
170
170
  */
171
171
  declare type ComponentProps<Component extends SvelteComponent> = Component extends SvelteComponentTyped<infer Props> ? Props : never;
172
172
 
173
- declare type SvelteConstructor<T> = new (...args: any[]) => T;
174
- declare type SvelteComponentOptions<T extends SvelteComponentDev$1> = Omit<ComponentConstructorOptions<ComponentProps<T>>, 'hydrate' | 'target' | '$$inline'>;
173
+ type SvelteConstructor<T> = new (...args: any[]) => T;
174
+ type SvelteComponentOptions<T extends SvelteComponentDev$1> = Omit<ComponentConstructorOptions<ComponentProps<T>>, 'hydrate' | 'target' | '$$inline'>;
175
175
  interface MountOptions<T extends SvelteComponentDev$1> extends SvelteComponentOptions<T> {
176
176
  log?: boolean;
177
177
  }
@@ -13,7 +13,7 @@
13
13
  "devDependencies": {
14
14
  "@cypress/mount-utils": "0.0.0-development",
15
15
  "svelte": "^3.49.0",
16
- "typescript": "^4.7.4"
16
+ "typescript": "^5.4.5"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "cypress": ">=10.6.0",