@applitools/eyes-cypress 3.33.1 → 3.34.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/CHANGELOG.md +95 -0
- package/README.md +3 -3
- package/dist/browser/spec-driver.js +12 -0
- package/dist/browser/transformCypressCheckSettings.js +7 -0
- package/dist/plugin/errorDigest.js +1 -1
- package/dist/plugin/pluginExport.js +8 -0
- package/package.json +29 -45
- package/src/browser/commands.js +10 -14
- package/test/components/cypress/support/commands.js +25 -0
- package/test/components/src/index.js +8 -0
- package/test/coverage/generic/cypress/support/commands.js +25 -0
- package/test/coverage/generic/cypress/support/index.js +1 -0
- package/test/coverage/index.js +24 -0
- package/test/e2e/cypress/plugins/index.js +22 -0
- package/test/e2e/ts/cypress/support/index.js +1 -0
- package/test/fixtures/cypress/plugins/index.js +22 -0
- package/test/unit/setup/fixtures/cypressConfig-legacy-file/index.js +0 -0
- package/types/expose.d.ts +11 -11
- package/test/fixtures/testAppCopies/.gitignore +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,101 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
## [3.34.1](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-cypress@3.34.0...js/eyes-cypress@3.34.1) (2023-07-05)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
|
|
20
|
+
* @applitools/core bumped from 3.4.0 to 3.5.0
|
|
21
|
+
#### Features
|
|
22
|
+
|
|
23
|
+
* added auto applitools lib detection ([#1707](https://github.com/applitools/eyes.sdk.javascript1/issues/1707)) ([7d439b5](https://github.com/applitools/eyes.sdk.javascript1/commit/7d439b52af55f3b0596c9d35d6ba85c717448023))
|
|
24
|
+
* support dns caching ([#1680](https://github.com/applitools/eyes.sdk.javascript1/issues/1680)) ([9bbff34](https://github.com/applitools/eyes.sdk.javascript1/commit/9bbff34f50c9d18758b55a6bcb45571ca1148180))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* some fix ([660a137](https://github.com/applitools/eyes.sdk.javascript1/commit/660a1376a49dd28f8f399690502cd3d1f77665fa))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
* @applitools/core-base bumped from 1.2.1 to 1.3.0
|
|
34
|
+
#### Features
|
|
35
|
+
|
|
36
|
+
* support dns caching ([#1680](https://github.com/applitools/eyes.sdk.javascript1/issues/1680)) ([9bbff34](https://github.com/applitools/eyes.sdk.javascript1/commit/9bbff34f50c9d18758b55a6bcb45571ca1148180))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
* @applitools/req bumped from 1.3.3 to 1.4.0
|
|
41
|
+
#### Features
|
|
42
|
+
|
|
43
|
+
* support dns caching ([#1680](https://github.com/applitools/eyes.sdk.javascript1/issues/1680)) ([9bbff34](https://github.com/applitools/eyes.sdk.javascript1/commit/9bbff34f50c9d18758b55a6bcb45571ca1148180))
|
|
44
|
+
* @applitools/driver bumped from 1.12.4 to 1.13.0
|
|
45
|
+
#### Features
|
|
46
|
+
|
|
47
|
+
* added auto applitools lib detection ([#1707](https://github.com/applitools/eyes.sdk.javascript1/issues/1707)) ([7d439b5](https://github.com/applitools/eyes.sdk.javascript1/commit/7d439b52af55f3b0596c9d35d6ba85c717448023))
|
|
48
|
+
* @applitools/ec-client bumped from 1.5.0 to 1.6.0
|
|
49
|
+
#### Features
|
|
50
|
+
|
|
51
|
+
* added support of regional execution cloud servers ([#1711](https://github.com/applitools/eyes.sdk.javascript1/issues/1711)) ([2e26c69](https://github.com/applitools/eyes.sdk.javascript1/commit/2e26c6944bb15f6121fb37c1dba95aba162c1f6a))
|
|
52
|
+
* support dns caching ([#1680](https://github.com/applitools/eyes.sdk.javascript1/issues/1680)) ([9bbff34](https://github.com/applitools/eyes.sdk.javascript1/commit/9bbff34f50c9d18758b55a6bcb45571ca1148180))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
#### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* fixed auto tunnel cleanup after unexpected end of the process ([3c1ad08](https://github.com/applitools/eyes.sdk.javascript1/commit/3c1ad0837d2d3560becc6d89370aa878becb3270))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
* @applitools/tunnel-client bumped from 0.1.1 to 1.0.0
|
|
62
|
+
#### Features
|
|
63
|
+
|
|
64
|
+
* added binaries and made them available in jfrog ([92033fe](https://github.com/applitools/eyes.sdk.javascript1/commit/92033fed7edc58bbc4a4e37269068418fe3afc3d))
|
|
65
|
+
* release as 1.0.0 ([93bf312](https://github.com/applitools/eyes.sdk.javascript1/commit/93bf31205b07d19bc2cb4f50b974c7bad0f49cea))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
* @applitools/ufg-client bumped from 1.2.22 to 1.3.0
|
|
70
|
+
#### Features
|
|
71
|
+
|
|
72
|
+
* support dns caching ([#1680](https://github.com/applitools/eyes.sdk.javascript1/issues/1680)) ([9bbff34](https://github.com/applitools/eyes.sdk.javascript1/commit/9bbff34f50c9d18758b55a6bcb45571ca1148180))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
* @applitools/eyes bumped from 1.5.0 to 1.5.1
|
|
77
|
+
#### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* fixed issue with getResults log appearing in console when file handler configured ([56b75c2](https://github.com/applitools/eyes.sdk.javascript1/commit/56b75c2185906c1581980985816a000c14000ac3))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
#### Reverts
|
|
83
|
+
|
|
84
|
+
* revert removal of `nmgOptions` api ([b8d03c7](https://github.com/applitools/eyes.sdk.javascript1/commit/b8d03c77e8243397ecca233e46d56f7437d16df4))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
* @applitools/spec-driver-webdriver bumped from 1.0.36 to 1.0.37
|
|
89
|
+
|
|
90
|
+
* @applitools/nml-client bumped from 1.5.0 to 1.5.1
|
|
91
|
+
|
|
92
|
+
* @applitools/screenshoter bumped from 3.8.1 to 3.8.2
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## [3.34.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes-cypress-v3.33.2...js/eyes-cypress@3.34.0) (2023-07-01)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Features
|
|
99
|
+
|
|
100
|
+
* add getResults api ([d92ea94](https://github.com/applitools/eyes.sdk.javascript1/commit/d92ea9434f6758bf38214648a0543c8d683ecc6e))
|
|
101
|
+
* add getResults api to Cypress ([#1663](https://github.com/applitools/eyes.sdk.javascript1/issues/1663)) ([b522222](https://github.com/applitools/eyes.sdk.javascript1/commit/b522222038f33c69191e534cca0f87622188f63b))
|
|
102
|
+
* handled abandoned tunnels ([#1669](https://github.com/applitools/eyes.sdk.javascript1/issues/1669)) ([e01a9f6](https://github.com/applitools/eyes.sdk.javascript1/commit/e01a9f6f7543fc5e6bd842acf6ee8de8cfb49998))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Bug Fixes
|
|
106
|
+
|
|
107
|
+
* some fix ([8aca690](https://github.com/applitools/eyes.sdk.javascript1/commit/8aca690a75963cf2641242e0128d30c9794c6263))
|
|
108
|
+
* use new delete test implementation ([d819ad0](https://github.com/applitools/eyes.sdk.javascript1/commit/d819ad05387175a86f1a18009f81c1854a7c7a21))
|
|
109
|
+
|
|
15
110
|
## 3.33.1 - 2023/5/31
|
|
16
111
|
|
|
17
112
|
### Features
|
package/README.md
CHANGED
|
@@ -486,7 +486,7 @@ cy.get('.some-div-to-float').then($el => {
|
|
|
486
486
|
|
|
487
487
|
##### `layout`
|
|
488
488
|
|
|
489
|
-
(optional): A single or an array of regions to match as [layout level.](https://
|
|
489
|
+
(optional): A single or an array of regions to match as [layout level.](https://applitools.com/docs/common/cmn-eyes-match-levels.html) For example:
|
|
490
490
|
|
|
491
491
|
```js
|
|
492
492
|
cy.eyesCheckWindow({
|
|
@@ -506,7 +506,7 @@ cy.get('.some-div-to-float').then($el => {
|
|
|
506
506
|
|
|
507
507
|
##### `strict`
|
|
508
508
|
|
|
509
|
-
(optional): A single or an array of regions to match as [strict level.](https://
|
|
509
|
+
(optional): A single or an array of regions to match as [strict level.](https://applitools.com/docs/common/cmn-eyes-match-levels.html) For example:
|
|
510
510
|
|
|
511
511
|
```js
|
|
512
512
|
cy.eyesCheckWindow({
|
|
@@ -526,7 +526,7 @@ cy.get('.some-div-to-float').then($el => {
|
|
|
526
526
|
|
|
527
527
|
##### `content`
|
|
528
528
|
|
|
529
|
-
(optional): A single or an array of regions to match as [content level.](https://
|
|
529
|
+
(optional): A single or an array of regions to match as [content level.](https://applitools.com/docs/common/cmn-eyes-match-levels.html) For example:
|
|
530
530
|
|
|
531
531
|
```js
|
|
532
532
|
cy.eyesCheckWindow({
|
|
@@ -11,6 +11,7 @@ function executeScript(context, script, arg) {
|
|
|
11
11
|
scriptToExecute = prepScirpt.concat(' return func(arg)');
|
|
12
12
|
}
|
|
13
13
|
if (!context.defaultView) {
|
|
14
|
+
// after reload the window is null
|
|
14
15
|
context = fallBackToMainContext();
|
|
15
16
|
}
|
|
16
17
|
const executor = new context.defaultView.Function('arg', scriptToExecute);
|
|
@@ -18,14 +19,17 @@ function executeScript(context, script, arg) {
|
|
|
18
19
|
}
|
|
19
20
|
exports.executeScript = executeScript;
|
|
20
21
|
function mainContext() {
|
|
22
|
+
//@ts-ignore
|
|
21
23
|
return cy.state('window').document;
|
|
22
24
|
}
|
|
23
25
|
exports.mainContext = mainContext;
|
|
24
26
|
function parentContext(context) {
|
|
27
|
+
// because Cypress doesn't support cross origin iframe, then childContext might return null, and then the input to parentContext might be null
|
|
25
28
|
if (!context) {
|
|
26
29
|
throw new Error('Context is not accessible');
|
|
27
30
|
}
|
|
28
31
|
else if (!context.defaultView) {
|
|
32
|
+
// after reload the window is null
|
|
29
33
|
return fallBackToMainContext();
|
|
30
34
|
}
|
|
31
35
|
return context === mainContext() ? context : context.defaultView.frameElement.ownerDocument;
|
|
@@ -40,6 +44,7 @@ function childContext(_context, element) {
|
|
|
40
44
|
}
|
|
41
45
|
exports.childContext = childContext;
|
|
42
46
|
function getViewportSize() {
|
|
47
|
+
//@ts-ignore
|
|
43
48
|
const currWindow = cy.state('window');
|
|
44
49
|
const viewportSize = {
|
|
45
50
|
width: currWindow.innerWidth || currWindow.document.documentElement.clientWidth || currWindow.document.body.clientWidth,
|
|
@@ -49,6 +54,7 @@ function getViewportSize() {
|
|
|
49
54
|
}
|
|
50
55
|
exports.getViewportSize = getViewportSize;
|
|
51
56
|
function setViewportSize(vs) {
|
|
57
|
+
//@ts-ignore
|
|
52
58
|
Cypress.action('cy:viewport:changed', { viewportWidth: vs.size.width, viewportHeight: vs.size.height });
|
|
53
59
|
}
|
|
54
60
|
exports.setViewportSize = setViewportSize;
|
|
@@ -94,17 +100,23 @@ function getTitle(context) {
|
|
|
94
100
|
exports.getTitle = getTitle;
|
|
95
101
|
function getUrl(context) {
|
|
96
102
|
if (context && !context.location) {
|
|
103
|
+
// after reload, the location is null
|
|
97
104
|
context = fallBackToMainContext();
|
|
98
105
|
}
|
|
99
106
|
return context.location.href;
|
|
100
107
|
}
|
|
101
108
|
exports.getUrl = getUrl;
|
|
102
109
|
function getCookies() {
|
|
110
|
+
//@ts-ignore
|
|
103
111
|
return Cypress.automation('get:cookies', {});
|
|
104
112
|
}
|
|
105
113
|
exports.getCookies = getCookies;
|
|
106
114
|
function fallBackToMainContext() {
|
|
107
115
|
const context = mainContext();
|
|
116
|
+
//@ts-ignore
|
|
108
117
|
context['applitools-marker'] = 'root-context';
|
|
109
118
|
return context;
|
|
110
119
|
}
|
|
120
|
+
// export function takeScreenshot(page: Driver): Promise<Buffer>;
|
|
121
|
+
// export function visit(page: Driver, url: string): Promise<void>; (??)
|
|
122
|
+
// export function isStaleElementError(err: any): boolean;
|
|
@@ -72,6 +72,7 @@ function transformCypressCheckSettings(settings, refer) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
else if (utils.types.has(checkSettings.element, [0])) {
|
|
75
|
+
// JQuery element
|
|
75
76
|
regionSettings = {
|
|
76
77
|
region: Object.assign(refer.ref(checkSettings.element[0]), { type: 'element' }),
|
|
77
78
|
};
|
|
@@ -242,6 +243,9 @@ function transformCypressCheckSettings(settings, refer) {
|
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
245
|
else if (isHTMLElement(region) || utils.types.has(region, 'jquery')) {
|
|
246
|
+
// @ts-ignore
|
|
247
|
+
//for some reason TS doesn't recognize that region is an HTMLElement,
|
|
248
|
+
//but if I paste the conditions from the method here, it does recornize it
|
|
245
249
|
resRegions = [...resRegions, ...refElements(region)];
|
|
246
250
|
}
|
|
247
251
|
else {
|
|
@@ -279,6 +283,7 @@ function transformCypressCheckSettings(settings, refer) {
|
|
|
279
283
|
}
|
|
280
284
|
else if (utils.types.has(region, 'jquery')) {
|
|
281
285
|
region.each(function () {
|
|
286
|
+
// there's a small chance that `this` is not an HTML element. So we just verify it.
|
|
282
287
|
elements.push(isHTMLElement(this) ? Object.assign(refer.ref(this), { type: 'element' }) : this);
|
|
283
288
|
});
|
|
284
289
|
}
|
|
@@ -289,6 +294,8 @@ function transformCypressCheckSettings(settings, refer) {
|
|
|
289
294
|
return elements;
|
|
290
295
|
}
|
|
291
296
|
function isHTMLElement(element) {
|
|
297
|
+
// Avoiding instanceof here since the element might come from an iframe, and `instanceof HTMLElement` would fail.
|
|
298
|
+
// This check looks naive, but if anyone passes something like {nodeType: 1} as a region, then I'm fine with them crashing :)
|
|
292
299
|
return utils.types.has(element, 'nodeType') && element.nodeType === Node.ELEMENT_NODE;
|
|
293
300
|
}
|
|
294
301
|
}
|
|
@@ -45,7 +45,7 @@ function hasError(testResult) {
|
|
|
45
45
|
function errorDigest({ passed, failed, diffs, logger, isInteractive }) {
|
|
46
46
|
logger.log('errorDigest: diff errors', diffs);
|
|
47
47
|
logger.log('errorDigest: test errors', failed);
|
|
48
|
-
const testResultsUrl = diffs.length ? colorify(` ${diffs[0].url} `, 'teal') : '';
|
|
48
|
+
const testResultsUrl = diffs.length ? colorify(` ${diffs[0].url} `, 'teal') : ''; // the space around the url is for the link to be clickable in the cypress run
|
|
49
49
|
const testResultsPrefix = testResultsUrl ? 'See details at:' : '';
|
|
50
50
|
const footer = testResultsUrl ? `\n${indent()}${colorify(testResultsPrefix)}${testResultsUrl}` : '';
|
|
51
51
|
return (colorify('Eyes-Cypress detected diffs or errors during execution of visual tests.') +
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const isGlobalHooksSupported_1 = __importDefault(require("./isGlobalHooksSupported"));
|
|
7
|
+
// @ts-ignore
|
|
7
8
|
const functional_commons_1 = require("@applitools/functional-commons");
|
|
8
9
|
const hooks_1 = __importDefault(require("./hooks"));
|
|
9
10
|
function makePluginExport({ startServer, eyesConfig, }) {
|
|
@@ -41,6 +42,8 @@ function makePluginExport({ startServer, eyesConfig, }) {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
else {
|
|
45
|
+
// this is required because we are currently support cypress < 10
|
|
46
|
+
// in the version before 10 the `e2e.setupNodeEvents` and `component.setupNodeEvents` were not supported
|
|
44
47
|
const pluginAsCypress10PluginOptions = pluginInitArgs;
|
|
45
48
|
if (pluginAsCypress10PluginOptions.component) {
|
|
46
49
|
pluginExportsComponent = pluginAsCypress10PluginOptions.component.setupNodeEvents;
|
|
@@ -71,6 +74,7 @@ function makePluginExport({ startServer, eyesConfig, }) {
|
|
|
71
74
|
const isGlobalHookCalledFromUserHandlerMap = new Map();
|
|
72
75
|
eyesConfig.eyesIsGlobalHooksSupported = (0, isGlobalHooksSupported_1.default)(cypressConfig);
|
|
73
76
|
let moduleExportsResult = {};
|
|
77
|
+
// in case setupNodeEvents is not defined in cypress.config file
|
|
74
78
|
if (typeof pluginModuleExports === 'function') {
|
|
75
79
|
moduleExportsResult = await pluginModuleExports(onThatCallsUserDefinedHandler, cypressConfig);
|
|
76
80
|
}
|
|
@@ -82,6 +86,10 @@ function makePluginExport({ startServer, eyesConfig, }) {
|
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
return Object.assign({}, eyesConfig, { eyesPort: port }, moduleExportsResult);
|
|
89
|
+
// This piece of code exists because at the point of writing, Cypress does not support multiple event handlers:
|
|
90
|
+
// https://github.com/cypress-io/cypress/issues/5240#issuecomment-948277554
|
|
91
|
+
// So we wrap Cypress' `on` function in order to wrap the user-defined handler. This way we can call our own handler
|
|
92
|
+
// in addition to the user's handler
|
|
85
93
|
function onThatCallsUserDefinedHandler(eventName, handler) {
|
|
86
94
|
const isRunEvent = eventName === 'before:run' || eventName === 'after:run';
|
|
87
95
|
let handlerToCall = handler;
|
package/package.json
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-cypress",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git://github.com/applitools/eyes.sdk.javascript1.git",
|
|
7
7
|
"directory": "js/packages/eyes-cypress"
|
|
8
8
|
},
|
|
9
9
|
"license": "SEE LICENSE IN LICENSE",
|
|
10
|
-
"aliases": [
|
|
11
|
-
"cypress",
|
|
12
|
-
"cy"
|
|
13
|
-
],
|
|
14
10
|
"main": "./index.js",
|
|
15
11
|
"types": "./types/index.d.ts",
|
|
16
12
|
"bin": {
|
|
@@ -26,29 +22,29 @@
|
|
|
26
22
|
"types"
|
|
27
23
|
],
|
|
28
24
|
"scripts": {
|
|
29
|
-
"lint": "eslint \"**/*.{js,ts}\"",
|
|
30
|
-
"build": "
|
|
25
|
+
"lint": "run --top-level eslint \"**/*.{js,ts}\"",
|
|
26
|
+
"build": "run --top-level tspc --project ./tsconfig.build.json",
|
|
31
27
|
"generate:tests": "coverage-tests generate",
|
|
32
|
-
"test": "yarn test:unit && yarn test:it && yarn test:
|
|
28
|
+
"test": "yarn test:unit && yarn test:it && yarn test:ts:compile && yarn test:e2e && yarn test:components && yarn test:coverage",
|
|
33
29
|
"test:sanity": "yarn test:unit && yarn test:it && yarn test:ts",
|
|
34
|
-
"test:unit": "mocha --no-timeouts 'test/unit/**/*.test.js'",
|
|
35
|
-
"test:it": "
|
|
30
|
+
"test:unit": "run --top-level mocha --no-timeouts 'test/unit/**/*.test.js'",
|
|
31
|
+
"test:it": "run --top-level mocha --no-timeouts 'test/it/**/*.test.js'",
|
|
36
32
|
"test:ts": "yarn test:ts:compile && yarn test:ts:run",
|
|
37
|
-
"test:ts:compile": "
|
|
33
|
+
"test:ts:compile": "run --top-level tsc --project test/e2e/ts/cypress",
|
|
38
34
|
"test:ts:run:legacy": "yarn cypress9 run --config-file ./test/e2e/ts/cypress-ts-legacy.json",
|
|
39
|
-
"cypress8": "
|
|
35
|
+
"cypress8": "../../node_modules/cypress8/bin/cypress",
|
|
40
36
|
"test:ts:run:8": "yarn cypress8 run --project ./test/e2e/ts --config-file ./cypress-8.config.ts",
|
|
41
|
-
"cypress9": "
|
|
37
|
+
"cypress9": "../../node_modules/cypress9/bin/cypress",
|
|
42
38
|
"test:ts:run:9": "yarn cypress9 run --project ./test/e2e/ts --config-file ./cypress-9.config.ts",
|
|
43
|
-
"cypress10": "
|
|
39
|
+
"cypress10": "../../node_modules/cypress10/bin/cypress",
|
|
44
40
|
"test:ts:run:10": "yarn cypress10 run --project ./test/e2e/ts --config-file ./cypress-10.config.ts",
|
|
45
|
-
"cypress11": "
|
|
41
|
+
"cypress11": "../../node_modules/cypress11/bin/cypress",
|
|
46
42
|
"test:ts:run:11": "yarn cypress11 run --project ./test/e2e/ts --config-file ./cypress-11.config.ts",
|
|
47
|
-
"cypress12": "
|
|
43
|
+
"cypress12": "../../node_modules/cypress12/bin/cypress",
|
|
48
44
|
"test:ts:run:12": "yarn cypress12 run --project ./test/e2e/ts --config-file ./cypress-12.config.ts",
|
|
49
|
-
"test:ts:run": "yarn
|
|
50
|
-
"test:coverage": "yarn generate:tests && cd test/coverage/generic && yarn &&
|
|
51
|
-
"test:e2e": "mkdir -p test/fixtures/testAppCopies && mocha --no-timeouts 'test/e2e/**/*.test.js'",
|
|
45
|
+
"test:ts:run": "yarn cypress$APPLITOOLS_FRAMEWORK_VERSION run --project ./test/e2e/ts --config-file ./cypress-$APPLITOOLS_FRAMEWORK_VERSION.config.ts",
|
|
46
|
+
"test:coverage": "yarn generate:tests && cd test/coverage/generic && yarn && APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-cypress' APPLITOOLS_BATCH_ID=$(uuidgen) npx cypress run",
|
|
47
|
+
"test:e2e": "mkdir -p test/fixtures/testAppCopies && run --top-level mocha --no-timeouts 'test/e2e/**/*.test.js'",
|
|
52
48
|
"test:components": "cd test/components && yarn && npx cypress run --component",
|
|
53
49
|
"cypress": "cypress open --config-file test/fixtures/cypress-play.json",
|
|
54
50
|
"cypress:new": "cd test/play && yarn && npx cypress open",
|
|
@@ -56,24 +52,14 @@
|
|
|
56
52
|
"cypress:run:new": "cd test/play && yarn && npx cypress run --spec=../fixtures/testApp/cypress/integration-play/play.js",
|
|
57
53
|
"cypress:play": "cd test/fixtures/testApp && cypress run --config integrationFolder=cypress/integration-play,pluginsFile=cypress/plugins/index-play.js,supportFile=cypress/support/index-run.js --spec=cypress/integration-play/play.js",
|
|
58
54
|
"render": "run(){ npx cypress run --config integrationFolder=test/fixtures/testApp/cypress/render,pluginsFile=test/fixtures/testApp/cypress/plugins/index-render.js,supportFile=test/fixtures/testApp/cypress/support/index-run.js --env url=$1; }; run",
|
|
59
|
-
"setup": "
|
|
60
|
-
"xvfb:setup": "sudo apt-get install -y xvfb; Xvfb -ac $DISPLAY -screen 0 1280x1024x16 & echo 'Run xvfb'; sleep 10",
|
|
61
|
-
"deps": "bongo deps",
|
|
62
|
-
"preversion": "yarn build && bongo preversion --skip-deps --verifyPendingChanges --skipVerifyInstalledVersions",
|
|
63
|
-
"version": "bongo version --withPendingChanges",
|
|
64
|
-
"postversion": "bongo postversion"
|
|
65
|
-
},
|
|
66
|
-
"husky": {
|
|
67
|
-
"hooks": {
|
|
68
|
-
"pre-push": "yarn bongo lint"
|
|
69
|
-
}
|
|
55
|
+
"setup": "run --top-level xvfb:setup"
|
|
70
56
|
},
|
|
71
57
|
"dependencies": {
|
|
72
|
-
"@applitools/core": "3.
|
|
73
|
-
"@applitools/eyes": "1.
|
|
58
|
+
"@applitools/core": "3.5.0",
|
|
59
|
+
"@applitools/eyes": "1.5.1",
|
|
74
60
|
"@applitools/functional-commons": "1.6.0",
|
|
75
|
-
"@applitools/logger": "2.0.
|
|
76
|
-
"@applitools/utils": "1.
|
|
61
|
+
"@applitools/logger": "2.0.5",
|
|
62
|
+
"@applitools/utils": "1.5.0",
|
|
77
63
|
"boxen": "5.1.2",
|
|
78
64
|
"chalk": "3.0.0",
|
|
79
65
|
"semver": "7.3.8",
|
|
@@ -85,9 +71,9 @@
|
|
|
85
71
|
"@applitools/bongo": "^4.0.0",
|
|
86
72
|
"@applitools/sdk-coverage-tests": "^3.0.2",
|
|
87
73
|
"@applitools/snaptdout": "1.0.1",
|
|
88
|
-
"@applitools/test-server": "1.2.2",
|
|
89
|
-
"@applitools/test-utils": "1.5.17",
|
|
90
|
-
"@types/node": "12",
|
|
74
|
+
"@applitools/test-server": "^1.2.2",
|
|
75
|
+
"@applitools/test-utils": "^1.5.17",
|
|
76
|
+
"@types/node": "^12.20.55",
|
|
91
77
|
"@types/semver": "^7.3.13",
|
|
92
78
|
"@types/uuid": "^9.0.0",
|
|
93
79
|
"@types/ws": "^8.2.2",
|
|
@@ -100,18 +86,16 @@
|
|
|
100
86
|
"cypress12": "npm:cypress@^12.0.0",
|
|
101
87
|
"cypress8": "npm:cypress@^8.7.0",
|
|
102
88
|
"cypress9": "npm:cypress@^9.0.0",
|
|
103
|
-
"eslint": "8.10.0",
|
|
104
|
-
"eslint-plugin-mocha-no-only": "1.1.1",
|
|
105
|
-
"husky": "4.3.8",
|
|
106
89
|
"lodash.omit": "4.5.0",
|
|
107
|
-
"mocha": "
|
|
90
|
+
"mocha": "^10.2.0",
|
|
108
91
|
"morgan": "1.9.1",
|
|
109
92
|
"ncp": "2.0.0",
|
|
110
|
-
"node-fetch": "2.6.0"
|
|
111
|
-
"prettier": "^2.6.2"
|
|
93
|
+
"node-fetch": "2.6.0"
|
|
112
94
|
},
|
|
113
95
|
"engines": {
|
|
114
96
|
"node": ">=12.13.0"
|
|
115
97
|
},
|
|
116
|
-
"
|
|
117
|
-
|
|
98
|
+
"publishConfig": {
|
|
99
|
+
"access": "public"
|
|
100
|
+
}
|
|
101
|
+
}
|
package/src/browser/commands.js
CHANGED
|
@@ -5,6 +5,7 @@ const Refer = require('./refer')
|
|
|
5
5
|
const Socket = require('./socket')
|
|
6
6
|
const {socketCommands} = require('./socketCommands')
|
|
7
7
|
const {TestResultsSummaryData: TestResultsSummary} = require('@applitools/eyes/dist/output/TestResultsSummary')
|
|
8
|
+
const {TestResultsData} = require('@applitools/eyes/dist/output/TestResults')
|
|
8
9
|
const refer = new Refer()
|
|
9
10
|
const socket = new Socket()
|
|
10
11
|
const throwErr = Cypress.config('failCypressOnDiff')
|
|
@@ -52,21 +53,16 @@ Cypress.Commands.add('eyesGetAllTestResults', () => {
|
|
|
52
53
|
return
|
|
53
54
|
}
|
|
54
55
|
|
|
55
|
-
const deleteTest = ({settings: {testId, batchId, secretToken}}) => {
|
|
56
|
-
const {serverUrl, proxy, apiKey} = Cypress.config('appliConfFile')
|
|
57
|
-
return socket.request('Core.deleteTest', {
|
|
58
|
-
settings: {
|
|
59
|
-
testId,
|
|
60
|
-
batchId,
|
|
61
|
-
secretToken,
|
|
62
|
-
serverUrl,
|
|
63
|
-
proxy,
|
|
64
|
-
apiKey,
|
|
65
|
-
},
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
56
|
const summary = await getSummary()
|
|
69
|
-
return new TestResultsSummary({summary, deleteTest})
|
|
57
|
+
return new TestResultsSummary({summary, core: {deleteTest: options => socket.request('Core.deleteTest', options)}})
|
|
58
|
+
})
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
Cypress.Commands.add('eyesGetResults', (args = {}) => {
|
|
62
|
+
Cypress.log({name: 'Eyes: getResults'})
|
|
63
|
+
return cy.then({timeout: 86400000}, async () => {
|
|
64
|
+
const result = await socket.request('Eyes.getResults', {eyes, settings: {throwErr: args.throwErr !== false}})
|
|
65
|
+
return new TestResultsData({result, core: {deleteTest: options => socket.request('Core.deleteTest', options)}})
|
|
70
66
|
})
|
|
71
67
|
})
|
|
72
68
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ***********************************************
|
|
2
|
+
// This example commands.js shows you how to
|
|
3
|
+
// create various custom commands and overwrite
|
|
4
|
+
// existing commands.
|
|
5
|
+
//
|
|
6
|
+
// For more comprehensive examples of custom
|
|
7
|
+
// commands please read more here:
|
|
8
|
+
// https://on.cypress.io/custom-commands
|
|
9
|
+
// ***********************************************
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
// -- This is a parent command --
|
|
13
|
+
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
// -- This is a child command --
|
|
17
|
+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
// -- This is a dual command --
|
|
21
|
+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
// -- This will overwrite an existing command --
|
|
25
|
+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ***********************************************
|
|
2
|
+
// This example commands.js shows you how to
|
|
3
|
+
// create various custom commands and overwrite
|
|
4
|
+
// existing commands.
|
|
5
|
+
//
|
|
6
|
+
// For more comprehensive examples of custom
|
|
7
|
+
// commands please read more here:
|
|
8
|
+
// https://on.cypress.io/custom-commands
|
|
9
|
+
// ***********************************************
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
// -- This is a parent command --
|
|
13
|
+
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
// -- This is a child command --
|
|
17
|
+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
// -- This is a dual command --
|
|
21
|
+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
// -- This will overwrite an existing command --
|
|
25
|
+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../commands';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
name: 'eyes-cypress',
|
|
3
|
+
ext: '.spec.js',
|
|
4
|
+
emitter: './test/coverage/emitter.js',
|
|
5
|
+
template: './test/coverage/template.hbs',
|
|
6
|
+
output: './test/coverage/generic/cypress/e2e/generic',
|
|
7
|
+
tests: 'https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/coverage-tests.js',
|
|
8
|
+
overrides: [
|
|
9
|
+
'https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/js/overrides.js',
|
|
10
|
+
'https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/js/js-overrides.js',
|
|
11
|
+
...(process.env.APPLITOOLS_TEST_REMOTE === 'eg'
|
|
12
|
+
? ['https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/eg.overrides.js']
|
|
13
|
+
: []),
|
|
14
|
+
'./test/coverage/overrides.js',
|
|
15
|
+
],
|
|
16
|
+
emitOnly: test => {
|
|
17
|
+
if (
|
|
18
|
+
test.api === 'classic' ||
|
|
19
|
+
(test.name.toLowerCase().includes('shadow') && test.name.toLowerCase().includes('dom'))
|
|
20
|
+
)
|
|
21
|
+
return false
|
|
22
|
+
return test.vg
|
|
23
|
+
},
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************************
|
|
3
|
+
// This example plugins/index.js can be used to load plugins
|
|
4
|
+
//
|
|
5
|
+
// You can change the location of this file or turn off loading
|
|
6
|
+
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
+
//
|
|
8
|
+
// You can read more here:
|
|
9
|
+
// https://on.cypress.io/plugins-guide
|
|
10
|
+
// ***********************************************************
|
|
11
|
+
|
|
12
|
+
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
+
// the project's config changing)
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @type {Cypress.PluginConfig}
|
|
17
|
+
*/
|
|
18
|
+
// eslint-disable-next-line no-unused-vars
|
|
19
|
+
module.exports = (on, config) => {
|
|
20
|
+
// `on` is used to hook into various events Cypress emits
|
|
21
|
+
// `config` is the resolved Cypress config
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../commands';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************************
|
|
3
|
+
// This example plugins/index.js can be used to load plugins
|
|
4
|
+
//
|
|
5
|
+
// You can change the location of this file or turn off loading
|
|
6
|
+
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
+
//
|
|
8
|
+
// You can read more here:
|
|
9
|
+
// https://on.cypress.io/plugins-guide
|
|
10
|
+
// ***********************************************************
|
|
11
|
+
|
|
12
|
+
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
+
// the project's config changing)
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @type {Cypress.PluginConfig}
|
|
17
|
+
*/
|
|
18
|
+
// eslint-disable-next-line no-unused-vars
|
|
19
|
+
module.exports = (on, config) => {
|
|
20
|
+
// `on` is used to hook into various events Cypress emits
|
|
21
|
+
// `config` is the resolved Cypress config
|
|
22
|
+
};
|
|
File without changes
|
package/types/expose.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export enum DeviceName {
|
|
|
74
74
|
Huawei_Mate_50_Pro = 'Huawei Mate 50 Pro',
|
|
75
75
|
Huawei_Matepad_11 = 'Huawei Matepad 11'
|
|
76
76
|
}
|
|
77
|
-
export type ScreenOrientationPlain = "
|
|
77
|
+
export type ScreenOrientationPlain = "portrait" | "landscape";
|
|
78
78
|
export type LegacyRegion = { left: number; top: number; width: number; height: number; };
|
|
79
79
|
export type Selector = string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; };
|
|
80
80
|
export type Element = HTMLElement | JQuery;
|
|
@@ -193,8 +193,8 @@ export type CypressCheckSettings = {
|
|
|
193
193
|
layoutBreakpoints?: boolean | Array<number> | { breakpoints: boolean | Array<number>; reload?: boolean; };
|
|
194
194
|
visualGridOptions?: { [key: string]: any; };
|
|
195
195
|
nmgOptions?: { [key: string]: any; };
|
|
196
|
+
useSystemScreenshot?: boolean;
|
|
196
197
|
hooks?: { beforeCaptureScreenshot: string; };
|
|
197
|
-
renderId?: string;
|
|
198
198
|
timeout?: number;
|
|
199
199
|
waitBeforeCapture?: number;
|
|
200
200
|
lazyLoad?: boolean | { scrollLength?: number; waitingTime?: number; maxAmountToScroll?: number; };
|
|
@@ -202,14 +202,14 @@ export type CypressCheckSettings = {
|
|
|
202
202
|
target?: "window" | "region";
|
|
203
203
|
selector?: Selector;
|
|
204
204
|
element?: Element;
|
|
205
|
-
ignore?: MaybeArray<string |
|
|
206
|
-
layout?: MaybeArray<string |
|
|
207
|
-
content?: MaybeArray<string |
|
|
208
|
-
strict?: MaybeArray<string |
|
|
205
|
+
ignore?: MaybeArray<string | LegacyRegion | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | Element | SelectorWithOptions>;
|
|
206
|
+
layout?: MaybeArray<string | LegacyRegion | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | Element | SelectorWithOptions>;
|
|
207
|
+
content?: MaybeArray<string | LegacyRegion | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | Element | SelectorWithOptions>;
|
|
208
|
+
strict?: MaybeArray<string | LegacyRegion | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | Element | SelectorWithOptions>;
|
|
209
209
|
floating?: FloatingRegion;
|
|
210
210
|
accessibility?: accessibilityRegion;
|
|
211
211
|
scriptHooks?: { beforeCaptureScreenshot: string; };
|
|
212
|
-
browser?: MaybeArray<{ name?: "chrome" | "
|
|
212
|
+
browser?: MaybeArray<{ name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: ScreenOrientationPlain; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { deviceName: DeviceName; screenOrientation?: ScreenOrientationPlain; name?: string; }>;
|
|
213
213
|
};
|
|
214
214
|
export type CypressEyesConfig = {
|
|
215
215
|
debugScreenshots?: { save: boolean; path?: string; prefix?: string; };
|
|
@@ -332,12 +332,12 @@ export type CypressEyesConfig = {
|
|
|
332
332
|
rotation?: 0 | 270 | -270 | 180 | -180 | 90 | -90;
|
|
333
333
|
scaleRatio?: number;
|
|
334
334
|
concurrentSessions?: number;
|
|
335
|
-
browsersInfo?: Array<{ name?: "chrome" | "
|
|
335
|
+
browsersInfo?: Array<{ name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: ScreenOrientationPlain; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; }>;
|
|
336
336
|
visualGridOptions?: Record<string, any>;
|
|
337
337
|
layoutBreakpoints?: boolean | Array<number> | { breakpoints: boolean | Array<number>; reload?: boolean; };
|
|
338
338
|
disableBrowserFetching?: boolean;
|
|
339
339
|
waitBeforeCapture?: number;
|
|
340
|
-
browser?: MaybeArray<{ name?: "chrome" | "
|
|
340
|
+
browser?: MaybeArray<{ name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: ScreenOrientationPlain; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { deviceName: DeviceName; screenOrientation?: ScreenOrientationPlain; name?: string; }>;
|
|
341
341
|
batchId?: string;
|
|
342
342
|
batchName?: string;
|
|
343
343
|
batchSequence?: string;
|
|
@@ -462,7 +462,7 @@ export type CypressTestResultsSummary = { getAllResults(): Array<{ getTestResult
|
|
|
462
462
|
isPassed(): boolean;
|
|
463
463
|
delete(): Promise<void>;
|
|
464
464
|
deleteSession(): Promise<void>;
|
|
465
|
-
}; getException(): Error; getBrowserInfo(): { name?: "chrome" | "
|
|
465
|
+
}; getException(): Error; getBrowserInfo(): { name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: ScreenOrientationPlain; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: ScreenOrientationPlain; }; }>; [Symbol.iterator](): Iterator<{ getTestResults(): {
|
|
466
466
|
getId(): string;
|
|
467
467
|
setId(_id: string): void;
|
|
468
468
|
getName(): string;
|
|
@@ -572,7 +572,7 @@ export type CypressTestResultsSummary = { getAllResults(): Array<{ getTestResult
|
|
|
572
572
|
isPassed(): boolean;
|
|
573
573
|
delete(): Promise<void>;
|
|
574
574
|
deleteSession(): Promise<void>;
|
|
575
|
-
}; getException(): Error; getBrowserInfo(): { name?: "chrome" | "
|
|
575
|
+
}; getException(): Error; getBrowserInfo(): { name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: ScreenOrientationPlain; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: ScreenOrientationPlain; }; } | { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: ScreenOrientationPlain; }; }, any, undefined>; };
|
|
576
576
|
export type EyesPluginConfig = {
|
|
577
577
|
tapDirPath: string;
|
|
578
578
|
tapFileName: string;
|