cypress 16.2.0 → 16.2.1
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/angular/dist/index.js +6 -7
- package/angular/angular/package.json +7 -22
- package/angular/dist/index.js +6 -7
- package/angular/package.json +7 -22
- package/dist/bin/cypress +2 -2
- package/dist/{cli-AgTnS5LO.js → cli-DoJnc1F1.js} +6 -5
- package/dist/cli.js +2 -2
- package/dist/{cypress-CdDm9AVa.js → cypress-BTgp4zGi.js} +1 -1
- package/dist/cypress.js +3 -3
- package/dist/exec/spawn.js +1 -1
- package/dist/index.js +3 -3
- package/dist/{spawn-DElwyZHC.js → spawn-zPuxj7Kz.js} +2 -2
- package/dist/{tap-WHD3nHJC.js → tap-D2mHgoNE.js} +2 -2
- package/mount-utils/dist/index.js +0 -1
- package/mount-utils/mount-utils/dist/index.js +0 -1
- package/mount-utils/mount-utils/package.json +14 -14
- package/mount-utils/package.json +14 -14
- package/package.json +4 -4
- package/react/dist/cypress-react.cjs.js +5 -6
- package/react/dist/cypress-react.esm-bundler.js +5 -6
- package/react/package.json +26 -46
- package/react/react/dist/cypress-react.cjs.js +5 -6
- package/react/react/dist/cypress-react.esm-bundler.js +5 -6
- package/react/react/package.json +26 -46
- package/svelte/dist/cypress-svelte.cjs.js +0 -1
- package/svelte/dist/cypress-svelte.esm-bundler.js +0 -1
- package/svelte/package.json +24 -22
- package/svelte/svelte/dist/cypress-svelte.cjs.js +0 -1
- package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +0 -1
- package/svelte/svelte/package.json +24 -22
- package/types/cy-chai.d.ts +99 -2
- package/types/cypress.d.ts +208 -42
- package/vue/dist/cypress-vue.cjs.js +1 -2
- package/vue/dist/cypress-vue.esm-bundler.js +1 -2
- package/vue/package.json +35 -42
- package/vue/vue/dist/cypress-vue.cjs.js +1 -2
- package/vue/vue/dist/cypress-vue.esm-bundler.js +1 -2
- package/vue/vue/package.json +35 -42
|
@@ -88,7 +88,6 @@ function setupHooks(optionalCallback) {
|
|
|
88
88
|
Cypress.Commands.overwrite('origin', () => {
|
|
89
89
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
90
90
|
});
|
|
91
|
-
// @ts-ignore
|
|
92
91
|
Cypress.on('test:before:after:run:async', () => {
|
|
93
92
|
optionalCallback?.();
|
|
94
93
|
});
|
|
@@ -284,10 +283,10 @@ function registerSignalEventsIfNeeded(propKey, propValue, componentValue, inject
|
|
|
284
283
|
function detectAndRegisterOutputSpyToSignal(config, component, key, injector) {
|
|
285
284
|
if (config.componentProperties) {
|
|
286
285
|
const expectedChangeKey = `${key}Change`;
|
|
287
|
-
|
|
286
|
+
const changeKeyIfExists = !!Object.keys(config.componentProperties).find((componentKey) => componentKey === expectedChangeKey);
|
|
288
287
|
if (changeKeyIfExists) {
|
|
289
288
|
component[expectedChangeKey] =
|
|
290
|
-
// @ts-expect-error
|
|
289
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
291
290
|
config.componentProperties[expectedChangeKey];
|
|
292
291
|
}
|
|
293
292
|
if (changeKeyIfExists) {
|
|
@@ -324,7 +323,7 @@ function setupComponent(config, fixture) {
|
|
|
324
323
|
var _a;
|
|
325
324
|
// only assign props if they are passed into the component
|
|
326
325
|
if ((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) {
|
|
327
|
-
// @ts-expect-error
|
|
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);
|
|
@@ -336,11 +335,11 @@ function setupComponent(config, fixture) {
|
|
|
336
335
|
const property = component[key];
|
|
337
336
|
// 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
337
|
// 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
|
|
338
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
340
339
|
if (property instanceof EventEmitter || (((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) && (config === null || config === void 0 ? void 0 : config.componentProperties[key]) instanceof EventEmitter)) {
|
|
341
340
|
// only assign props if they are passed into the component
|
|
342
341
|
if ((_b = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _b === void 0 ? void 0 : _b.hasOwnProperty(key)) {
|
|
343
|
-
// @ts-expect-error
|
|
342
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
344
343
|
const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key];
|
|
345
344
|
component[key] = passedInValue;
|
|
346
345
|
}
|
|
@@ -418,7 +417,7 @@ function mount(component, config = {}) {
|
|
|
418
417
|
const componentFixture = initTestBed(component, config);
|
|
419
418
|
let mountResponsePromiseResolver;
|
|
420
419
|
let mountResponsePromiseRejector;
|
|
421
|
-
|
|
420
|
+
const mountResponsePromise = new Promise((resolve, reject) => {
|
|
422
421
|
mountResponsePromiseResolver = resolve;
|
|
423
422
|
mountResponsePromiseRejector = reject;
|
|
424
423
|
});
|
|
@@ -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/angular/dist/index.js
CHANGED
|
@@ -88,7 +88,6 @@ function setupHooks(optionalCallback) {
|
|
|
88
88
|
Cypress.Commands.overwrite('origin', () => {
|
|
89
89
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
90
90
|
});
|
|
91
|
-
// @ts-ignore
|
|
92
91
|
Cypress.on('test:before:after:run:async', () => {
|
|
93
92
|
optionalCallback?.();
|
|
94
93
|
});
|
|
@@ -284,10 +283,10 @@ function registerSignalEventsIfNeeded(propKey, propValue, componentValue, inject
|
|
|
284
283
|
function detectAndRegisterOutputSpyToSignal(config, component, key, injector) {
|
|
285
284
|
if (config.componentProperties) {
|
|
286
285
|
const expectedChangeKey = `${key}Change`;
|
|
287
|
-
|
|
286
|
+
const changeKeyIfExists = !!Object.keys(config.componentProperties).find((componentKey) => componentKey === expectedChangeKey);
|
|
288
287
|
if (changeKeyIfExists) {
|
|
289
288
|
component[expectedChangeKey] =
|
|
290
|
-
// @ts-expect-error
|
|
289
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
291
290
|
config.componentProperties[expectedChangeKey];
|
|
292
291
|
}
|
|
293
292
|
if (changeKeyIfExists) {
|
|
@@ -324,7 +323,7 @@ function setupComponent(config, fixture) {
|
|
|
324
323
|
var _a;
|
|
325
324
|
// only assign props if they are passed into the component
|
|
326
325
|
if ((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) {
|
|
327
|
-
// @ts-expect-error
|
|
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);
|
|
@@ -336,11 +335,11 @@ function setupComponent(config, fixture) {
|
|
|
336
335
|
const property = component[key];
|
|
337
336
|
// 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
337
|
// 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
|
|
338
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
340
339
|
if (property instanceof EventEmitter || (((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) && (config === null || config === void 0 ? void 0 : config.componentProperties[key]) instanceof EventEmitter)) {
|
|
341
340
|
// only assign props if they are passed into the component
|
|
342
341
|
if ((_b = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _b === void 0 ? void 0 : _b.hasOwnProperty(key)) {
|
|
343
|
-
// @ts-expect-error
|
|
342
|
+
// @ts-expect-error key is a string, not keyof T, so it can't index componentProperties
|
|
344
343
|
const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key];
|
|
345
344
|
component[key] = passedInValue;
|
|
346
345
|
}
|
|
@@ -418,7 +417,7 @@ function mount(component, config = {}) {
|
|
|
418
417
|
const componentFixture = initTestBed(component, config);
|
|
419
418
|
let mountResponsePromiseResolver;
|
|
420
419
|
let mountResponsePromiseRejector;
|
|
421
|
-
|
|
420
|
+
const mountResponsePromise = new Promise((resolve, reject) => {
|
|
422
421
|
mountResponsePromiseResolver = resolve;
|
|
423
422
|
mountResponsePromiseRejector = reject;
|
|
424
423
|
});
|
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,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var cli = require('../cli-
|
|
4
|
+
var cli = require('../cli-DoJnc1F1.js');
|
|
5
5
|
require('../xvfb-CbW2_YXR.js');
|
|
6
6
|
require('os');
|
|
7
7
|
require('bluebird');
|
|
@@ -32,7 +32,7 @@ require('commander');
|
|
|
32
32
|
require('cli-table3');
|
|
33
33
|
require('dayjs');
|
|
34
34
|
require('dayjs/plugin/relativeTime');
|
|
35
|
-
require('../spawn-
|
|
35
|
+
require('../spawn-zPuxj7Kz.js');
|
|
36
36
|
require('child_process');
|
|
37
37
|
require('listr2');
|
|
38
38
|
require('readline');
|
|
@@ -13,7 +13,7 @@ var dayjs = require('dayjs');
|
|
|
13
13
|
var relativeTime = require('dayjs/plugin/relativeTime');
|
|
14
14
|
var chalk = require('chalk');
|
|
15
15
|
var Bluebird = require('bluebird');
|
|
16
|
-
var spawn = require('./spawn-
|
|
16
|
+
var spawn = require('./spawn-zPuxj7Kz.js');
|
|
17
17
|
var os = require('os');
|
|
18
18
|
var listr2 = require('listr2');
|
|
19
19
|
var timers = require('timers/promises');
|
|
@@ -1889,7 +1889,8 @@ const downloadFromUrl = ({ url, downloadDestination, progress, ca, version, redi
|
|
|
1889
1889
|
* @param [string] downloadDestination Local filename to save as
|
|
1890
1890
|
*/
|
|
1891
1891
|
const start$2 = (opts) => xvfb.__awaiter(void 0, void 0, void 0, function* () {
|
|
1892
|
-
|
|
1892
|
+
const { version, downloadDestination, redirectTTL } = opts;
|
|
1893
|
+
let { progress } = opts;
|
|
1893
1894
|
if (!downloadDestination) {
|
|
1894
1895
|
assert.ok(_.isString(downloadDestination) && !_.isEmpty(downloadDestination), 'missing download dir');
|
|
1895
1896
|
}
|
|
@@ -2507,7 +2508,7 @@ var installModule = {
|
|
|
2507
2508
|
const debug$1 = Debug('cypress:cli');
|
|
2508
2509
|
const getBinaryDirectory = () => xvfb.__awaiter(void 0, void 0, void 0, function* () {
|
|
2509
2510
|
if (xvfb.util.getEnv('CYPRESS_RUN_BINARY')) {
|
|
2510
|
-
|
|
2511
|
+
const envBinaryPath = path.resolve(xvfb.util.getEnv('CYPRESS_RUN_BINARY'));
|
|
2511
2512
|
try {
|
|
2512
2513
|
const envBinaryDir = yield xvfb.stateModule.parseRealPlatformBinaryFolderAsync(envBinaryPath);
|
|
2513
2514
|
if (!envBinaryDir) {
|
|
@@ -2957,7 +2958,7 @@ const cliModule = {
|
|
|
2957
2958
|
}
|
|
2958
2959
|
if (xvfb.util.isNonProductionCypressInternalEnvValue(CYPRESS_INTERNAL_ENV)) {
|
|
2959
2960
|
debug('non-production CYPRESS_INTERNAL_ENV value', CYPRESS_INTERNAL_ENV);
|
|
2960
|
-
|
|
2961
|
+
const msg = `
|
|
2961
2962
|
${logSymbols.warning} Warning: It looks like you're passing CYPRESS_INTERNAL_ENV=${CYPRESS_INTERNAL_ENV}
|
|
2962
2963
|
|
|
2963
2964
|
The environment variable "CYPRESS_INTERNAL_ENV" is reserved and should only be used internally.
|
|
@@ -3088,7 +3089,7 @@ const cliModule = {
|
|
|
3088
3089
|
.action(function (opts, args) {
|
|
3089
3090
|
return xvfb.__awaiter(this, void 0, void 0, function* () {
|
|
3090
3091
|
try {
|
|
3091
|
-
const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-
|
|
3092
|
+
const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-D2mHgoNE.js'); });
|
|
3092
3093
|
const code = yield tapModule.start(args || [], _.pick(opts, ['session', 'json', 'timeout']));
|
|
3093
3094
|
process.exit(code);
|
|
3094
3095
|
}
|
package/dist/cli.js
CHANGED
|
@@ -8,8 +8,8 @@ require('commander');
|
|
|
8
8
|
require('common-tags');
|
|
9
9
|
require('log-symbols');
|
|
10
10
|
require('debug');
|
|
11
|
-
var cli = require('./cli-
|
|
12
|
-
require('./spawn-
|
|
11
|
+
var cli = require('./cli-DoJnc1F1.js');
|
|
12
|
+
require('./spawn-zPuxj7Kz.js');
|
|
13
13
|
require('os');
|
|
14
14
|
require('bluebird');
|
|
15
15
|
require('@cypress/xvfb');
|
package/dist/cypress.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
require('./xvfb-CbW2_YXR.js');
|
|
4
4
|
require('tmp');
|
|
5
5
|
require('fs-extra');
|
|
6
|
-
require('./cli-
|
|
7
|
-
var cypress = require('./cypress-
|
|
6
|
+
require('./cli-DoJnc1F1.js');
|
|
7
|
+
var cypress = require('./cypress-BTgp4zGi.js');
|
|
8
8
|
require('os');
|
|
9
9
|
require('bluebird');
|
|
10
10
|
require('@cypress/xvfb');
|
|
@@ -33,7 +33,7 @@ require('commander');
|
|
|
33
33
|
require('cli-table3');
|
|
34
34
|
require('dayjs');
|
|
35
35
|
require('dayjs/plugin/relativeTime');
|
|
36
|
-
require('./spawn-
|
|
36
|
+
require('./spawn-zPuxj7Kz.js');
|
|
37
37
|
require('child_process');
|
|
38
38
|
require('listr2');
|
|
39
39
|
require('readline');
|
package/dist/exec/spawn.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var xvfb = require('./xvfb-CbW2_YXR.js');
|
|
6
6
|
var minimist = require('minimist');
|
|
7
7
|
var Debug = require('debug');
|
|
8
|
-
var cli$1 = require('./cli-
|
|
9
|
-
var spawn = require('./spawn-
|
|
10
|
-
var cypress = require('./cypress-
|
|
8
|
+
var cli$1 = require('./cli-DoJnc1F1.js');
|
|
9
|
+
var spawn = require('./spawn-zPuxj7Kz.js');
|
|
10
|
+
var cypress = require('./cypress-BTgp4zGi.js');
|
|
11
11
|
require('os');
|
|
12
12
|
require('bluebird');
|
|
13
13
|
require('@cypress/xvfb');
|
|
@@ -95,7 +95,7 @@ const runSmokeTest = (binaryDir, options) => {
|
|
|
95
95
|
}
|
|
96
96
|
catch (err) {
|
|
97
97
|
debug$1('Smoke test failed:', err);
|
|
98
|
-
|
|
98
|
+
const errMessage = err.stderr || err.message;
|
|
99
99
|
debug$1('error message:', errMessage);
|
|
100
100
|
if (err.timedOut) {
|
|
101
101
|
debug$1('error timedOut is true');
|
|
@@ -1337,7 +1337,7 @@ function userFriendlySpawn(spawn, linuxWithDisplayEnv) {
|
|
|
1337
1337
|
function start(args_1) {
|
|
1338
1338
|
return xvfb.__awaiter(this, arguments, void 0, function* (args, options = {}) {
|
|
1339
1339
|
var _a, _b, _c, _d;
|
|
1340
|
-
|
|
1340
|
+
const executable = xvfb.util.getEnv('CYPRESS_RUN_BINARY') ?
|
|
1341
1341
|
path.resolve(xvfb.util.getEnv('CYPRESS_RUN_BINARY')) :
|
|
1342
1342
|
xvfb.stateModule.getPathToExecutable(xvfb.stateModule.getBinaryDir());
|
|
1343
1343
|
// Always push cwd into the args
|
|
@@ -4,7 +4,7 @@ var xvfb = require('./xvfb-CbW2_YXR.js');
|
|
|
4
4
|
var Debug = require('debug');
|
|
5
5
|
var commander = require('commander');
|
|
6
6
|
var path = require('path');
|
|
7
|
-
var cli = require('./cli-
|
|
7
|
+
var cli = require('./cli-DoJnc1F1.js');
|
|
8
8
|
var CRI = require('chrome-remote-interface');
|
|
9
9
|
var chalk = require('chalk');
|
|
10
10
|
var crypto = require('crypto');
|
|
@@ -33,7 +33,7 @@ require('untildify');
|
|
|
33
33
|
require('cli-table3');
|
|
34
34
|
require('dayjs');
|
|
35
35
|
require('dayjs/plugin/relativeTime');
|
|
36
|
-
require('./spawn-
|
|
36
|
+
require('./spawn-zPuxj7Kz.js');
|
|
37
37
|
require('child_process');
|
|
38
38
|
require('listr2');
|
|
39
39
|
require('readline');
|
|
@@ -34,7 +34,6 @@ export function setupHooks(optionalCallback) {
|
|
|
34
34
|
Cypress.Commands.overwrite('origin', () => {
|
|
35
35
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
36
36
|
});
|
|
37
|
-
// @ts-ignore
|
|
38
37
|
Cypress.on('test:before:after:run:async', () => {
|
|
39
38
|
optionalCallback?.();
|
|
40
39
|
});
|
|
@@ -34,7 +34,6 @@ export function setupHooks(optionalCallback) {
|
|
|
34
34
|
Cypress.Commands.overwrite('origin', () => {
|
|
35
35
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
36
36
|
});
|
|
37
|
-
// @ts-ignore
|
|
38
37
|
Cypress.on('test:before:after:run:async', () => {
|
|
39
38
|
optionalCallback?.();
|
|
40
39
|
});
|
|
@@ -2,7 +2,18 @@
|
|
|
2
2
|
"name": "@cypress/mount-utils",
|
|
3
3
|
"version": "0.0.0-development",
|
|
4
4
|
"description": "Shared utilities for the various component testing adapters",
|
|
5
|
+
"homepage": "https://github.com/cypress-io/cypress/tree/develop/npm/mount-utils#readme",
|
|
6
|
+
"bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/cypress-io/cypress.git"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
5
12
|
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
6
17
|
"scripts": {
|
|
7
18
|
"build": "tsc || echo 'built, with type errors'",
|
|
8
19
|
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
|
@@ -10,6 +21,9 @@
|
|
|
10
21
|
"lint": "eslint",
|
|
11
22
|
"watch": "tsc -w"
|
|
12
23
|
},
|
|
24
|
+
"lint-staged": {
|
|
25
|
+
"**/*.{js,jsx,ts,tsx,json}": "eslint --fix"
|
|
26
|
+
},
|
|
13
27
|
"dependencies": {},
|
|
14
28
|
"devDependencies": {
|
|
15
29
|
"@packages/eslint-config": "0.0.0-development",
|
|
@@ -22,20 +36,6 @@
|
|
|
22
36
|
"rollup-plugin-typescript2": "^0.37.0",
|
|
23
37
|
"typescript": "~5.4.5"
|
|
24
38
|
},
|
|
25
|
-
"files": [
|
|
26
|
-
"dist"
|
|
27
|
-
],
|
|
28
|
-
"types": "dist/index.d.ts",
|
|
29
|
-
"license": "MIT",
|
|
30
|
-
"repository": {
|
|
31
|
-
"type": "git",
|
|
32
|
-
"url": "https://github.com/cypress-io/cypress.git"
|
|
33
|
-
},
|
|
34
|
-
"homepage": "https://github.com/cypress-io/cypress/tree/develop/npm/mount-utils#readme",
|
|
35
|
-
"bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md",
|
|
36
|
-
"lint-staged": {
|
|
37
|
-
"**/*.{js,jsx,ts,tsx,json}": "eslint --fix"
|
|
38
|
-
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
package/mount-utils/package.json
CHANGED
|
@@ -2,7 +2,18 @@
|
|
|
2
2
|
"name": "@cypress/mount-utils",
|
|
3
3
|
"version": "0.0.0-development",
|
|
4
4
|
"description": "Shared utilities for the various component testing adapters",
|
|
5
|
+
"homepage": "https://github.com/cypress-io/cypress/tree/develop/npm/mount-utils#readme",
|
|
6
|
+
"bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/cypress-io/cypress.git"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
5
12
|
"main": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
6
17
|
"scripts": {
|
|
7
18
|
"build": "tsc || echo 'built, with type errors'",
|
|
8
19
|
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
|
@@ -10,6 +21,9 @@
|
|
|
10
21
|
"lint": "eslint",
|
|
11
22
|
"watch": "tsc -w"
|
|
12
23
|
},
|
|
24
|
+
"lint-staged": {
|
|
25
|
+
"**/*.{js,jsx,ts,tsx,json}": "eslint --fix"
|
|
26
|
+
},
|
|
13
27
|
"dependencies": {},
|
|
14
28
|
"devDependencies": {
|
|
15
29
|
"@packages/eslint-config": "0.0.0-development",
|
|
@@ -22,20 +36,6 @@
|
|
|
22
36
|
"rollup-plugin-typescript2": "^0.37.0",
|
|
23
37
|
"typescript": "~5.4.5"
|
|
24
38
|
},
|
|
25
|
-
"files": [
|
|
26
|
-
"dist"
|
|
27
|
-
],
|
|
28
|
-
"types": "dist/index.d.ts",
|
|
29
|
-
"license": "MIT",
|
|
30
|
-
"repository": {
|
|
31
|
-
"type": "git",
|
|
32
|
-
"url": "https://github.com/cypress-io/cypress.git"
|
|
33
|
-
},
|
|
34
|
-
"homepage": "https://github.com/cypress-io/cypress/tree/develop/npm/mount-utils#readme",
|
|
35
|
-
"bugs": "https://github.com/cypress-io/cypress/issues/new?template=1-bug-report.md",
|
|
36
|
-
"lint-staged": {
|
|
37
|
-
"**/*.{js,jsx,ts,tsx,json}": "eslint --fix"
|
|
38
|
-
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cypress",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node dist/index.js --exec install",
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
},
|
|
133
133
|
"buildInfo": {
|
|
134
134
|
"commitBranch": "develop",
|
|
135
|
-
"commitSha": "
|
|
136
|
-
"commitDate": "2026-10-
|
|
135
|
+
"commitSha": "519d66d80b0ae1bd3f9581665ce69473b82af59b",
|
|
136
|
+
"commitDate": "2026-10-27T21:23:59.000Z",
|
|
137
137
|
"stable": true
|
|
138
138
|
},
|
|
139
139
|
"description": "Cypress is a next generation front end testing tool built for the modern web",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
},
|
|
145
145
|
"repository": {
|
|
146
146
|
"type": "git",
|
|
147
|
-
"url": "https://github.com/cypress-io/cypress.git"
|
|
147
|
+
"url": "git+https://github.com/cypress-io/cypress.git"
|
|
148
148
|
},
|
|
149
149
|
"keywords": [
|
|
150
150
|
"automation",
|
|
@@ -102,7 +102,6 @@ function setupHooks(optionalCallback) {
|
|
|
102
102
|
Cypress.Commands.overwrite('origin', () => {
|
|
103
103
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
104
104
|
});
|
|
105
|
-
// @ts-ignore
|
|
106
105
|
Cypress.on('test:before:after:run:async', () => {
|
|
107
106
|
optionalCallback?.();
|
|
108
107
|
});
|
|
@@ -134,7 +133,7 @@ const makeMountFn = (type, jsx, options = {}, rerenderKey, internalMountOptions)
|
|
|
134
133
|
].join(' '));
|
|
135
134
|
}
|
|
136
135
|
const key = rerenderKey !== null && rerenderKey !== void 0 ? rerenderKey :
|
|
137
|
-
// @ts-
|
|
136
|
+
// @ts-expect-error - `mocha` is not in the public Cypress types. Provide unique key to the wrapped component to make sure we are rerendering between tests
|
|
138
137
|
(((_c = (_b = (_a = Cypress === null || Cypress === void 0 ? void 0 : Cypress.mocha) === null || _a === void 0 ? void 0 : _a.getRunner()) === null || _b === void 0 ? void 0 : _b.test) === null || _c === void 0 ? void 0 : _c.title) || '') + Math.random();
|
|
139
138
|
const props = {
|
|
140
139
|
key,
|
|
@@ -158,18 +157,18 @@ const makeMountFn = (type, jsx, options = {}, rerenderKey, internalMountOptions)
|
|
|
158
157
|
.then(() => {
|
|
159
158
|
if (options.log !== false) {
|
|
160
159
|
// Get the display name property via the component constructor
|
|
161
|
-
// @ts-ignore FIXME
|
|
162
160
|
const componentName = getDisplayName(jsx);
|
|
163
161
|
const jsxComponentName = `<${componentName} ... />`;
|
|
164
162
|
Cypress.log({
|
|
165
163
|
name: type,
|
|
166
164
|
type: 'parent',
|
|
167
165
|
message: [jsxComponentName],
|
|
168
|
-
// @ts-
|
|
166
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- @ts-expect-error would be unused once the cli typedefs are generated
|
|
167
|
+
// @ts-ignore - JQuery comes from cli/types/jquery, which is generated by the cli build and missing when this package builds first
|
|
169
168
|
$el: el.children.item(0),
|
|
170
169
|
consoleProps: () => {
|
|
171
170
|
return {
|
|
172
|
-
// @ts-
|
|
171
|
+
// @ts-expect-error - `props` is not on every `ReactNode` member, such as string
|
|
173
172
|
props: jsx === null || jsx === void 0 ? void 0 : jsx.props,
|
|
174
173
|
description: type === 'mount' ? 'Mounts React component' : 'Rerenders mounted React component',
|
|
175
174
|
home: 'https://github.com/cypress-io/cypress',
|
|
@@ -232,7 +231,7 @@ const createMount = (defaultOptions) => {
|
|
|
232
231
|
// Note: This would be a breaking change
|
|
233
232
|
// it is required to unmount component in beforeEach hook in order to provide a clean state inside test
|
|
234
233
|
// because `mount` can be called after some preparation that can side effect unmount
|
|
235
|
-
// @see npm/react/cypress/component/advanced/set-timeout-example/loading-indicator
|
|
234
|
+
// @see npm/react/cypress/component/advanced/set-timeout-example/loading-indicator.cy.tsx
|
|
236
235
|
setupHooks(preMountCleanup);
|
|
237
236
|
|
|
238
237
|
let root;
|
|
@@ -81,7 +81,6 @@ function setupHooks(optionalCallback) {
|
|
|
81
81
|
Cypress.Commands.overwrite('origin', () => {
|
|
82
82
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
83
83
|
});
|
|
84
|
-
// @ts-ignore
|
|
85
84
|
Cypress.on('test:before:after:run:async', () => {
|
|
86
85
|
optionalCallback?.();
|
|
87
86
|
});
|
|
@@ -113,7 +112,7 @@ const makeMountFn = (type, jsx, options = {}, rerenderKey, internalMountOptions)
|
|
|
113
112
|
].join(' '));
|
|
114
113
|
}
|
|
115
114
|
const key = rerenderKey !== null && rerenderKey !== void 0 ? rerenderKey :
|
|
116
|
-
// @ts-
|
|
115
|
+
// @ts-expect-error - `mocha` is not in the public Cypress types. Provide unique key to the wrapped component to make sure we are rerendering between tests
|
|
117
116
|
(((_c = (_b = (_a = Cypress === null || Cypress === void 0 ? void 0 : Cypress.mocha) === null || _a === void 0 ? void 0 : _a.getRunner()) === null || _b === void 0 ? void 0 : _b.test) === null || _c === void 0 ? void 0 : _c.title) || '') + Math.random();
|
|
118
117
|
const props = {
|
|
119
118
|
key,
|
|
@@ -137,18 +136,18 @@ const makeMountFn = (type, jsx, options = {}, rerenderKey, internalMountOptions)
|
|
|
137
136
|
.then(() => {
|
|
138
137
|
if (options.log !== false) {
|
|
139
138
|
// Get the display name property via the component constructor
|
|
140
|
-
// @ts-ignore FIXME
|
|
141
139
|
const componentName = getDisplayName(jsx);
|
|
142
140
|
const jsxComponentName = `<${componentName} ... />`;
|
|
143
141
|
Cypress.log({
|
|
144
142
|
name: type,
|
|
145
143
|
type: 'parent',
|
|
146
144
|
message: [jsxComponentName],
|
|
147
|
-
// @ts-
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- @ts-expect-error would be unused once the cli typedefs are generated
|
|
146
|
+
// @ts-ignore - JQuery comes from cli/types/jquery, which is generated by the cli build and missing when this package builds first
|
|
148
147
|
$el: el.children.item(0),
|
|
149
148
|
consoleProps: () => {
|
|
150
149
|
return {
|
|
151
|
-
// @ts-
|
|
150
|
+
// @ts-expect-error - `props` is not on every `ReactNode` member, such as string
|
|
152
151
|
props: jsx === null || jsx === void 0 ? void 0 : jsx.props,
|
|
153
152
|
description: type === 'mount' ? 'Mounts React component' : 'Rerenders mounted React component',
|
|
154
153
|
home: 'https://github.com/cypress-io/cypress',
|
|
@@ -211,7 +210,7 @@ const createMount = (defaultOptions) => {
|
|
|
211
210
|
// Note: This would be a breaking change
|
|
212
211
|
// it is required to unmount component in beforeEach hook in order to provide a clean state inside test
|
|
213
212
|
// because `mount` can be called after some preparation that can side effect unmount
|
|
214
|
-
// @see npm/react/cypress/component/advanced/set-timeout-example/loading-indicator
|
|
213
|
+
// @see npm/react/cypress/component/advanced/set-timeout-example/loading-indicator.cy.tsx
|
|
215
214
|
setupHooks(preMountCleanup);
|
|
216
215
|
|
|
217
216
|
let root;
|