cypress 16.2.0 → 16.3.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.
- package/angular/dist/index.js +10 -12
- package/angular/package.json +7 -22
- package/dist/bin/cypress +8 -8
- package/dist/{cli-AgTnS5LO.js → cli-y9Bb9Y77.js} +215 -40
- package/dist/cli.js +6 -6
- package/dist/{cypress-CdDm9AVa.js → cypress-CvEs5adm.js} +2 -2
- package/dist/cypress.js +8 -8
- package/dist/exec/spawn.js +4 -4
- package/dist/exec/xvfb.js +7 -4
- package/dist/index.js +8 -8
- package/dist/{spawn-DElwyZHC.js → spawn-Bx99tBTm.js} +529 -69
- package/dist/{tap-WHD3nHJC.js → tap-BMFGLoCT.js} +108 -26
- package/dist/{xvfb-CbW2_YXR.js → xvfb-DxbcANVl.js} +238 -25
- package/mount-utils/dist/index.js +1 -1
- package/mount-utils/package.json +15 -14
- package/package.json +5 -5
- package/react/dist/cypress-react.cjs.js +9 -7
- package/react/dist/cypress-react.esm-bundler.js +9 -7
- package/react/package.json +26 -46
- package/svelte/dist/cypress-svelte.cjs.js +3 -2
- package/svelte/dist/cypress-svelte.esm-bundler.js +3 -2
- package/svelte/package.json +24 -22
- package/types/cy-bluebird.d.ts +1 -0
- package/types/cy-chai.d.ts +99 -2
- package/types/cypress.d.ts +216 -43
- package/types/net-stubbing.d.ts +1 -1
- package/vue/dist/cypress-vue.cjs.js +4 -2
- package/vue/dist/cypress-vue.esm-bundler.js +4 -2
- package/vue/dist/index.d.ts +3 -3
- package/vue/package.json +35 -42
- package/angular/angular/README.md +0 -18
- package/angular/angular/dist/index.d.ts +0 -120
- package/angular/angular/dist/index.js +0 -479
- package/angular/angular/package.json +0 -82
- package/mount-utils/mount-utils/README.md +0 -140
- package/mount-utils/mount-utils/dist/index.d.ts +0 -12
- package/mount-utils/mount-utils/dist/index.js +0 -41
- package/mount-utils/mount-utils/package.json +0 -52
- package/react/react/README.md +0 -19
- package/react/react/dist/cypress-react.cjs.js +0 -293
- package/react/react/dist/cypress-react.esm-bundler.js +0 -268
- package/react/react/dist/index.d.ts +0 -95
- package/react/react/package.json +0 -113
- package/svelte/svelte/README.md +0 -19
- package/svelte/svelte/dist/cypress-svelte.cjs.js +0 -122
- package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +0 -120
- package/svelte/svelte/dist/index.d.ts +0 -31
- package/svelte/svelte/package.json +0 -63
- package/vue/vue/README.md +0 -14
- package/vue/vue/dist/cypress-vue.cjs.js +0 -8692
- package/vue/vue/dist/cypress-vue.esm-bundler.js +0 -8671
- package/vue/vue/dist/index.d.ts +0 -1413
- package/vue/vue/package.json +0 -97
package/angular/dist/index.js
CHANGED
|
@@ -69,6 +69,7 @@ const getContainerEl = () => {
|
|
|
69
69
|
* Utility function to register CT side effects and run cleanup code during the "test:before:run" Cypress hook
|
|
70
70
|
* @param optionalCallback Callback to be called before the next test runs
|
|
71
71
|
*/
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -- published API; narrowing the parameter would break callers that pass a `Function`
|
|
72
73
|
function setupHooks(optionalCallback) {
|
|
73
74
|
// We don't want CT side effects to run when e2e
|
|
74
75
|
// testing so we early return.
|
|
@@ -88,7 +89,6 @@ function setupHooks(optionalCallback) {
|
|
|
88
89
|
Cypress.Commands.overwrite('origin', () => {
|
|
89
90
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
90
91
|
});
|
|
91
|
-
// @ts-ignore
|
|
92
92
|
Cypress.on('test:before:after:run:async', () => {
|
|
93
93
|
optionalCallback?.();
|
|
94
94
|
});
|
|
@@ -284,10 +284,10 @@ function registerSignalEventsIfNeeded(propKey, propValue, componentValue, inject
|
|
|
284
284
|
function detectAndRegisterOutputSpyToSignal(config, component, key, injector) {
|
|
285
285
|
if (config.componentProperties) {
|
|
286
286
|
const expectedChangeKey = `${key}Change`;
|
|
287
|
-
|
|
287
|
+
const changeKeyIfExists = !!Object.keys(config.componentProperties).find((componentKey) => componentKey === expectedChangeKey);
|
|
288
288
|
if (changeKeyIfExists) {
|
|
289
289
|
component[expectedChangeKey] =
|
|
290
|
-
// @ts-expect-error
|
|
290
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
291
291
|
config.componentProperties[expectedChangeKey];
|
|
292
292
|
}
|
|
293
293
|
if (changeKeyIfExists) {
|
|
@@ -321,10 +321,9 @@ function setupComponent(config, fixture) {
|
|
|
321
321
|
component = Object.assign(component, config.componentProperties);
|
|
322
322
|
}
|
|
323
323
|
getComponentInputs(fixture.componentRef.componentType).forEach((key) => {
|
|
324
|
-
var _a;
|
|
325
324
|
// only assign props if they are passed into the component
|
|
326
|
-
if ((
|
|
327
|
-
// @ts-expect-error
|
|
325
|
+
if ((config === null || config === void 0 ? void 0 : config.componentProperties) && Object.hasOwn(config.componentProperties, key)) {
|
|
326
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
328
327
|
const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key];
|
|
329
328
|
registerSignalEventsIfNeeded(key, passedInValue, component[key], injector, fixture);
|
|
330
329
|
detectAndRegisterOutputSpyToSignal(config, component, key, injector);
|
|
@@ -332,15 +331,14 @@ function setupComponent(config, fixture) {
|
|
|
332
331
|
}
|
|
333
332
|
});
|
|
334
333
|
getComponentOutputs(fixture.componentRef.componentType).forEach((key) => {
|
|
335
|
-
var _a, _b;
|
|
336
334
|
const property = component[key];
|
|
337
335
|
// With the introduction of https://github.com/cypress-io/cypress/pull/31993, we want to make sure that component inputs are reference safe inside cy.mount().
|
|
338
336
|
// However, the exception to this is if the user passes in a Cypress output spy as a property in order to maintain backwards compatibility.
|
|
339
|
-
// @ts-expect-error
|
|
340
|
-
if (property instanceof EventEmitter || ((
|
|
337
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
338
|
+
if (property instanceof EventEmitter || ((config === null || config === void 0 ? void 0 : config.componentProperties) && Object.hasOwn(config.componentProperties, key) && (config === null || config === void 0 ? void 0 : config.componentProperties[key]) instanceof EventEmitter)) {
|
|
341
339
|
// only assign props if they are passed into the component
|
|
342
|
-
if ((
|
|
343
|
-
// @ts-expect-error
|
|
340
|
+
if ((config === null || config === void 0 ? void 0 : config.componentProperties) && Object.hasOwn(config.componentProperties, key)) {
|
|
341
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
344
342
|
const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key];
|
|
345
343
|
component[key] = passedInValue;
|
|
346
344
|
}
|
|
@@ -418,7 +416,7 @@ function mount(component, config = {}) {
|
|
|
418
416
|
const componentFixture = initTestBed(component, config);
|
|
419
417
|
let mountResponsePromiseResolver;
|
|
420
418
|
let mountResponsePromiseRejector;
|
|
421
|
-
|
|
419
|
+
const mountResponsePromise = new Promise((resolve, reject) => {
|
|
422
420
|
mountResponsePromiseResolver = resolve;
|
|
423
421
|
mountResponsePromiseRejector = reject;
|
|
424
422
|
});
|
package/angular/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
|
10
10
|
"check-ts": "tsc --noEmit",
|
|
11
11
|
"dev": "rollup -c rollup.config.mjs -w",
|
|
12
|
-
"lint": "eslint
|
|
12
|
+
"lint": "eslint"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {},
|
|
15
15
|
"devDependencies": {
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
"@angular/core": "^21.0.0",
|
|
18
18
|
"@angular/platform-browser": "^21.0.0",
|
|
19
19
|
"@cypress/mount-utils": "0.0.0-development",
|
|
20
|
+
"@packages/eslint-config": "0.0.0-development",
|
|
21
|
+
"eslint": "^9.31.0",
|
|
22
|
+
"jiti": "^2.4.2",
|
|
20
23
|
"rollup": "^4.60.2",
|
|
21
24
|
"typescript": "~5.9.2"
|
|
22
25
|
},
|
|
@@ -33,7 +36,7 @@
|
|
|
33
36
|
"license": "MIT",
|
|
34
37
|
"repository": {
|
|
35
38
|
"type": "git",
|
|
36
|
-
"url": "https://github.com/cypress-io/cypress.git"
|
|
39
|
+
"url": "git+https://github.com/cypress-io/cypress.git"
|
|
37
40
|
},
|
|
38
41
|
"homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/angular/#readme",
|
|
39
42
|
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fangular&template=1-bug-report.md&title=",
|
|
@@ -45,20 +48,6 @@
|
|
|
45
48
|
"testing",
|
|
46
49
|
"zoneless"
|
|
47
50
|
],
|
|
48
|
-
"contributors": [
|
|
49
|
-
{
|
|
50
|
-
"name": "Bill Glesias",
|
|
51
|
-
"social": "@atofstryker"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"name": "Jordan Powell",
|
|
55
|
-
"social": "@jordanpowell88"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"name": "Zach Williams",
|
|
59
|
-
"social": "@ZachJW34"
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
51
|
"module": "dist/index.js",
|
|
63
52
|
"publishConfig": {
|
|
64
53
|
"access": "public"
|
|
@@ -72,11 +61,7 @@
|
|
|
72
61
|
}
|
|
73
62
|
}
|
|
74
63
|
},
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"Cypress",
|
|
78
|
-
"cy",
|
|
79
|
-
"expect"
|
|
80
|
-
]
|
|
64
|
+
"lint-staged": {
|
|
65
|
+
"**/*.{js,jsx,ts,tsx,json}": "eslint --fix"
|
|
81
66
|
}
|
|
82
67
|
}
|
package/dist/bin/cypress
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var cli = require('../cli-
|
|
5
|
-
require('../xvfb-
|
|
4
|
+
var cli = require('../cli-y9Bb9Y77.js');
|
|
5
|
+
require('../xvfb-DxbcANVl.js');
|
|
6
|
+
require('lodash');
|
|
6
7
|
require('os');
|
|
8
|
+
require('path');
|
|
9
|
+
require('child_process');
|
|
10
|
+
require('fs-extra');
|
|
7
11
|
require('bluebird');
|
|
8
12
|
require('@cypress/xvfb');
|
|
9
13
|
require('common-tags');
|
|
10
14
|
require('debug');
|
|
11
15
|
require('chalk');
|
|
12
|
-
require('lodash');
|
|
13
16
|
require('assert');
|
|
14
17
|
require('arch');
|
|
15
18
|
require('ospath');
|
|
16
19
|
require('hasha');
|
|
17
20
|
require('tty');
|
|
18
|
-
require('path');
|
|
19
21
|
require('ci-info');
|
|
20
22
|
require('execa');
|
|
21
23
|
require('systeminformation');
|
|
@@ -25,19 +27,17 @@ require('executable');
|
|
|
25
27
|
require('process');
|
|
26
28
|
require('supports-color');
|
|
27
29
|
require('is-installed-globally');
|
|
28
|
-
require('fs-extra');
|
|
29
30
|
require('fs');
|
|
30
31
|
require('untildify');
|
|
31
32
|
require('commander');
|
|
32
33
|
require('cli-table3');
|
|
33
34
|
require('dayjs');
|
|
34
35
|
require('dayjs/plugin/relativeTime');
|
|
35
|
-
require('../spawn-
|
|
36
|
-
require('
|
|
36
|
+
require('../spawn-Bx99tBTm.js');
|
|
37
|
+
require('string_decoder');
|
|
37
38
|
require('listr2');
|
|
38
39
|
require('readline');
|
|
39
40
|
require('stream');
|
|
40
|
-
require('string_decoder');
|
|
41
41
|
require('node:string_decoder');
|
|
42
42
|
require('timers/promises');
|
|
43
43
|
require('fs/promises');
|