cypress 13.11.0 → 13.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/angular/angular/dist/index.d.ts +1 -1
  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 -1
  5. package/angular/dist/index.js +239 -239
  6. package/angular/package.json +1 -1
  7. package/lib/cli.js +0 -1
  8. package/lib/exec/xvfb.js +0 -1
  9. package/lib/logger.js +0 -3
  10. package/mount-utils/dist/index.d.ts +1 -1
  11. package/mount-utils/mount-utils/dist/index.d.ts +1 -1
  12. package/mount-utils/mount-utils/package.json +1 -1
  13. package/mount-utils/package.json +1 -1
  14. package/package.json +3 -3
  15. package/react/dist/cypress-react.cjs.js +237 -237
  16. package/react/dist/cypress-react.esm-bundler.js +237 -237
  17. package/react/dist/index.d.ts +1 -1
  18. package/react/package.json +3 -3
  19. package/react/react/dist/cypress-react.cjs.js +237 -237
  20. package/react/react/dist/cypress-react.esm-bundler.js +237 -237
  21. package/react/react/dist/index.d.ts +1 -1
  22. package/react/react/package.json +3 -3
  23. package/react18/dist/cypress-react.cjs.js +222 -222
  24. package/react18/dist/cypress-react.esm-bundler.js +222 -222
  25. package/react18/dist/index.d.ts +1 -1
  26. package/react18/package.json +1 -1
  27. package/react18/react18/dist/cypress-react.cjs.js +222 -222
  28. package/react18/react18/dist/cypress-react.esm-bundler.js +222 -222
  29. package/react18/react18/dist/index.d.ts +1 -1
  30. package/react18/react18/package.json +1 -1
  31. package/svelte/dist/cypress-svelte.cjs.js +61 -61
  32. package/svelte/dist/cypress-svelte.esm-bundler.js +61 -61
  33. package/svelte/dist/index.d.ts +2 -2
  34. package/svelte/package.json +1 -1
  35. package/svelte/svelte/dist/cypress-svelte.cjs.js +61 -61
  36. package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +61 -61
  37. package/svelte/svelte/dist/index.d.ts +2 -2
  38. package/svelte/svelte/package.json +1 -1
  39. package/vue/dist/cypress-vue.cjs.js +128 -128
  40. package/vue/dist/cypress-vue.esm-bundler.js +128 -128
  41. package/vue/dist/index.d.ts +5 -5
  42. package/vue/package.json +5 -5
  43. package/vue/vue/dist/cypress-vue.cjs.js +128 -128
  44. package/vue/vue/dist/cypress-vue.esm-bundler.js +128 -128
  45. package/vue/vue/dist/index.d.ts +5 -5
  46. package/vue/vue/package.json +5 -5
  47. package/vue2/dist/cypress-vue2.cjs.js +211 -211
  48. package/vue2/dist/cypress-vue2.esm-bundler.js +211 -211
  49. package/vue2/dist/index.d.ts +11 -11
  50. package/vue2/package.json +1 -1
  51. package/vue2/vue2/dist/cypress-vue2.cjs.js +211 -211
  52. package/vue2/vue2/dist/cypress-vue2.esm-bundler.js +211 -211
  53. package/vue2/vue2/dist/index.d.ts +11 -11
  54. 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",