@applitools/eyes-cypress 3.23.9 → 3.24.0-beta.2
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 +2195 -2186
- package/LICENSE +25 -25
- package/README.md +778 -769
- package/bin/eyes-setup.js +21 -21
- package/commands.js +2 -2
- package/dist/browser/spec-driver.js +104 -0
- package/dist/plugin/handler.js +55 -0
- package/eyes-index.d.ts +34 -34
- package/index.js +2 -2
- package/package.json +97 -81
- package/src/browser/commands.js +167 -147
- package/src/browser/eyesCheckMapping.js +71 -0
- package/src/browser/eyesOpenMapping.js +34 -0
- package/src/browser/makeSend.js +18 -22
- package/src/browser/refer.js +57 -0
- package/src/browser/sendRequest.js +16 -16
- package/src/browser/socket.js +143 -0
- package/src/browser/socketCommands.js +81 -0
- package/src/browser/spec-driver.ts +109 -0
- package/src/pem/server.cert +22 -22
- package/src/pem/server.key +27 -27
- package/src/plugin/concurrencyMsg.js +8 -8
- package/src/plugin/config.js +54 -53
- package/src/plugin/defaultPort.js +1 -1
- package/src/plugin/errorDigest.js +96 -96
- package/src/plugin/getErrorsAndDiffs.js +34 -34
- package/src/plugin/handleTestResults.js +39 -0
- package/src/plugin/handler.ts +58 -0
- package/src/plugin/hooks.js +49 -42
- package/src/plugin/isGlobalHooksSupported.js +13 -13
- package/src/plugin/pluginExport.js +60 -57
- package/src/plugin/server.js +98 -46
- package/src/plugin/startPlugin.js +13 -34
- package/src/plugin/webSocket.js +130 -0
- package/src/setup/addEyesCommands.js +24 -24
- package/src/setup/addEyesCypressPlugin.js +15 -15
- package/src/setup/getCypressConfig.js +16 -16
- package/src/setup/getFilePath.js +22 -22
- package/src/setup/handleCommands.js +23 -23
- package/src/setup/handlePlugin.js +23 -23
- package/src/setup/handleTypeScript.js +21 -21
- package/src/setup/isCommandsDefined.js +7 -7
- package/src/setup/isPluginDefined.js +7 -7
- package/test/fixtures/testAppCopies/.gitignore +1 -1
- package/src/browser/eyesCheckWindow.js +0 -132
- package/src/browser/getAllBlobs.js +0 -14
- package/src/browser/getBrowserInfo.js +0 -39
- package/src/browser/makeHandleCypressViewport.js +0 -22
- package/src/browser/poll.js +0 -25
- package/src/plugin/app.js +0 -42
- package/src/plugin/handlers.js +0 -205
- package/src/plugin/makeHandleBatchResultsFile.js +0 -17
- package/src/plugin/pollingHandler.js +0 -46
- package/src/plugin/processCloseAndAbort.js +0 -33
- package/src/plugin/runningTests.js +0 -27
- package/src/plugin/waitForBatch.js +0 -33
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
const uuid = require('uuid');
|
|
2
|
+
|
|
3
|
+
class Socket {
|
|
4
|
+
constructor() {
|
|
5
|
+
this._socket = null;
|
|
6
|
+
this._listeners = new Map();
|
|
7
|
+
this._queue = new Set();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
attach(ws) {
|
|
11
|
+
if (!ws) return;
|
|
12
|
+
|
|
13
|
+
if (ws.readyState === WebSocket.CONNECTING) ws.addEventListener('open', () => this.attach(ws));
|
|
14
|
+
else if (ws.readyState === WebSocket.OPEN) {
|
|
15
|
+
this._socket = ws;
|
|
16
|
+
this._queue.forEach(command => command());
|
|
17
|
+
this._queue.clear();
|
|
18
|
+
|
|
19
|
+
this._socket.addEventListener('message', message => {
|
|
20
|
+
const {name, key, payload} = this.deserialize(message);
|
|
21
|
+
const fns = this._listeners.get(name);
|
|
22
|
+
if (fns) fns.forEach(fn => fn(payload, key));
|
|
23
|
+
if (key) {
|
|
24
|
+
const fns = this._listeners.get(`${name}/${key}`);
|
|
25
|
+
if (fns) fns.forEach(fn => fn(payload, key));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
this._socket.addEventListener('close', () => {
|
|
29
|
+
const fns = this._listeners.get('close');
|
|
30
|
+
if (fns) fns.forEach(fn => fn());
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
on(type, fn) {
|
|
36
|
+
const name = typeof type === 'string' ? type : `${type.name}/${type.key}`;
|
|
37
|
+
let fns = this._listeners.get(name);
|
|
38
|
+
if (!fns) {
|
|
39
|
+
fns = new Set();
|
|
40
|
+
this._listeners.set(name, fns);
|
|
41
|
+
}
|
|
42
|
+
fns.add(fn);
|
|
43
|
+
return () => this.off(name, fn);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
connect(url) {
|
|
47
|
+
const ws = new WebSocket(url);
|
|
48
|
+
this.attach(ws);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
disconnect() {
|
|
52
|
+
if (!this._socket) return;
|
|
53
|
+
this._socket.terminate();
|
|
54
|
+
this._socket = null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
request(name, payload) {
|
|
58
|
+
return new Promise((resolve, reject) => {
|
|
59
|
+
try {
|
|
60
|
+
const key = uuid.v4();
|
|
61
|
+
this.emit({name, key}, payload);
|
|
62
|
+
this.once({name, key}, response => {
|
|
63
|
+
if (response.error) return reject(response.error);
|
|
64
|
+
return resolve(response.result);
|
|
65
|
+
});
|
|
66
|
+
} catch (ex) {
|
|
67
|
+
console.log(ex);
|
|
68
|
+
throw ex;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
command(name, fn) {
|
|
74
|
+
this.on(name, async (payload, key) => {
|
|
75
|
+
try {
|
|
76
|
+
const result = await fn(payload);
|
|
77
|
+
this.emit({name, key}, {result});
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.log(error);
|
|
80
|
+
this.emit({name, key}, {error});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
subscribe(name, publisher, fn) {
|
|
86
|
+
const subscription = uuid.v4();
|
|
87
|
+
this.emit(name, {publisher, subscription});
|
|
88
|
+
const off = this.on({name, key: subscription}, fn);
|
|
89
|
+
return () => (this.emit({name, key: subscription}), off());
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
once(type, fn) {
|
|
93
|
+
const off = this.on(type, (...args) => (fn(...args), this.off()));
|
|
94
|
+
return off;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
off(name, fn) {
|
|
98
|
+
if (!fn) return this._listeners.delete(name);
|
|
99
|
+
const fns = this._listeners.get(name);
|
|
100
|
+
if (!fns) return false;
|
|
101
|
+
const existed = fns.delete(fn);
|
|
102
|
+
if (!fns.size) this._listeners.delete(name);
|
|
103
|
+
return existed;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
emit(type, payload) {
|
|
107
|
+
try {
|
|
108
|
+
const command = () => this._socket.send(this.serialize(type, payload));
|
|
109
|
+
if (this._socket) command();
|
|
110
|
+
else this._queue.add(command);
|
|
111
|
+
return () => this._queue.delete(command);
|
|
112
|
+
} catch (ex) {
|
|
113
|
+
console.log(ex);
|
|
114
|
+
throw ex;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
ref() {
|
|
119
|
+
const command = () => this._socket._socket.ref();
|
|
120
|
+
if (this._socket) command();
|
|
121
|
+
else this._queue.add(command);
|
|
122
|
+
return () => this._queue.delete(command);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
unref() {
|
|
126
|
+
const command = () => this._socket._socket.unref();
|
|
127
|
+
if (this._socket) command();
|
|
128
|
+
else this._queue.add(command);
|
|
129
|
+
return () => this._queue.delete(command);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
serialize(type, payload) {
|
|
133
|
+
const message =
|
|
134
|
+
typeof type === 'string' ? {name: type, payload} : {name: type.name, key: type.key, payload};
|
|
135
|
+
return JSON.stringify(message);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
deserialize(message) {
|
|
139
|
+
return JSON.parse(message.data);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
module.exports = Socket;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const spec = require('../../dist/browser/spec-driver');
|
|
2
|
+
|
|
3
|
+
function socketCommands(socket, refer) {
|
|
4
|
+
socket.command('Driver.executeScript', ({context, script, arg = []}) => {
|
|
5
|
+
const res = spec.executeScript(refer.deref(context), script, derefArgs(arg));
|
|
6
|
+
return refer.ref(res);
|
|
7
|
+
});
|
|
8
|
+
socket.command('Driver.mainContext', () => {
|
|
9
|
+
return refer.ref(spec.mainContext());
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
socket.command('Driver.parentContext', ({context}) => {
|
|
13
|
+
return refer.ref(spec.parentContext(refer.deref(context)));
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
socket.command('Driver.childContext', ({context, element}) => {
|
|
17
|
+
return refer.ref(spec.childContext(refer.deref(context), refer.deref(element)));
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
socket.command('Driver.getViewportSize', () => {
|
|
21
|
+
return spec.getViewportSize();
|
|
22
|
+
});
|
|
23
|
+
socket.command('Driver.setViewportSize', vs => {
|
|
24
|
+
spec.setViewportSize(vs);
|
|
25
|
+
});
|
|
26
|
+
socket.command('Driver.findElement', ({context, selector, parent}) => {
|
|
27
|
+
const element = spec.findElement(
|
|
28
|
+
refer.deref(context),
|
|
29
|
+
spec.transformSelector(selector),
|
|
30
|
+
refer.deref(parent),
|
|
31
|
+
);
|
|
32
|
+
return element === null ? element : refer.ref(element, context);
|
|
33
|
+
});
|
|
34
|
+
socket.command('Driver.findElements', ({context, selector, parent}) => {
|
|
35
|
+
const elements = spec.findElements(
|
|
36
|
+
refer.deref(context),
|
|
37
|
+
spec.transformSelector(selector),
|
|
38
|
+
refer.deref(parent),
|
|
39
|
+
);
|
|
40
|
+
return Array.prototype.map.call(elements, element =>
|
|
41
|
+
element === null ? element : refer.ref(element, context),
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
socket.command('Driver.getUrl', context => {
|
|
46
|
+
return spec.getUrl(refer.deref(context));
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
socket.command('Driver.getTitle', context => {
|
|
50
|
+
return spec.getTitle(refer.deref(context.driver));
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
socket.command('Driver.getCookies', async () => {
|
|
54
|
+
return await spec.getCookies();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// utils
|
|
58
|
+
|
|
59
|
+
function derefArgs(arg) {
|
|
60
|
+
const derefArg = [];
|
|
61
|
+
if (Array.isArray(arg)) {
|
|
62
|
+
for (const argument of arg) {
|
|
63
|
+
if (Array.isArray(argument)) {
|
|
64
|
+
derefArg.push(derefArgs(argument));
|
|
65
|
+
} else {
|
|
66
|
+
derefArg.push(refer.deref(argument));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return derefArg;
|
|
70
|
+
} else if (typeof arg === 'object') {
|
|
71
|
+
for (const [key, value] of Object.entries(arg)) {
|
|
72
|
+
derefArg[key] = refer.deref(value);
|
|
73
|
+
}
|
|
74
|
+
return derefArg;
|
|
75
|
+
} else {
|
|
76
|
+
return arg;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
module.exports = {socketCommands};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type Selector = (string | {selector: string; type?: string}) & {__applitoolsBrand?: never};
|
|
2
|
+
export type Context = Document & {__applitoolsBrand?: never};
|
|
3
|
+
export type Element = HTMLElement & {__applitoolsBrand?: never};
|
|
4
|
+
|
|
5
|
+
export function executeScript(context: Context, script: string, arg: any): any {
|
|
6
|
+
context = getCurrenctContext(context)
|
|
7
|
+
|
|
8
|
+
let scriptToExecute;
|
|
9
|
+
if (
|
|
10
|
+
script.includes('dom-snapshot') ||
|
|
11
|
+
script.includes('dom-capture') ||
|
|
12
|
+
script.includes('dom-shared')
|
|
13
|
+
) {
|
|
14
|
+
scriptToExecute = script
|
|
15
|
+
} else {
|
|
16
|
+
const prepScirpt = script.replace('function(arg)', 'function func(arg)')
|
|
17
|
+
scriptToExecute = prepScirpt.concat(' return func(arg)')
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const executor = new context.defaultView.Function('arg', scriptToExecute);
|
|
21
|
+
return executor(arg)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function mainContext(): Context {
|
|
25
|
+
//@ts-ignore
|
|
26
|
+
return cy.state('window').document
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function parentContext(context: Context): Context {
|
|
30
|
+
if (!context) return; // because Cypress doesn't support cross origin iframe, then childContext might return null, and then the input to parentContext might be null
|
|
31
|
+
|
|
32
|
+
return context === mainContext() ? context : context.defaultView.frameElement.ownerDocument
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function childContext(_context: Context, element: HTMLIFrameElement): Context {
|
|
36
|
+
return element.contentDocument // null in case of cross origin iframe
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function getViewportSize(): Object {
|
|
40
|
+
//@ts-ignore
|
|
41
|
+
const currWindow = cy.state('window')
|
|
42
|
+
const viewportSize = {
|
|
43
|
+
width: Math.max(currWindow.document.documentElement.clientWidth || 0, currWindow.innerWidth || 0),
|
|
44
|
+
height: Math.max(currWindow.document.documentElement.clientHeight || 0, currWindow.innerHeight || 0)
|
|
45
|
+
};
|
|
46
|
+
return viewportSize;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function setViewportSize(vs: any): void {
|
|
50
|
+
//@ts-ignore
|
|
51
|
+
Cypress.action('cy:viewport:changed', { viewportWidth: vs.size.width, viewportHeight: vs.size.height });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function transformSelector(selector: Selector): Selector {
|
|
55
|
+
if (selector.hasOwnProperty('selector') && (!selector.hasOwnProperty('type') || selector.type === 'css')) {
|
|
56
|
+
return selector.selector
|
|
57
|
+
}
|
|
58
|
+
return selector
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function findElement(context: Context, selector: Selector, parent?: Element) {
|
|
62
|
+
// context = getCurrenctContext(context)
|
|
63
|
+
const root = parent ?? context
|
|
64
|
+
const sel = typeof selector === 'string' ? selector : selector.selector
|
|
65
|
+
if (typeof selector !== 'string' && selector.type === 'xpath') {
|
|
66
|
+
return context.evaluate(sel, context, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
|
|
67
|
+
} else {
|
|
68
|
+
return root.querySelector(sel)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function findElements(context: Context, selector: Selector, parent: Element){
|
|
73
|
+
context = getCurrenctContext(context)
|
|
74
|
+
const root = parent ?? context
|
|
75
|
+
const sel = typeof selector === 'string' ? selector : selector.selector
|
|
76
|
+
if (typeof selector !== 'string' && selector.type === 'xpath') {
|
|
77
|
+
// TODO return multiple
|
|
78
|
+
return context.evaluate(sel, context, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
|
|
79
|
+
} else {
|
|
80
|
+
return root.querySelectorAll(sel)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function getTitle(context: Context): string {
|
|
85
|
+
context = getCurrenctContext(context)
|
|
86
|
+
return context.title
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function getUrl(context: Context): string {
|
|
90
|
+
context = getCurrenctContext(context)
|
|
91
|
+
return context.location.href
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function getCookies(): Array<any> {
|
|
95
|
+
//@ts-ignore
|
|
96
|
+
return Cypress.automation('get:cookies', {})
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// we need to method to reset the context in case the user called open before visit
|
|
100
|
+
function getCurrenctContext(context: Context){
|
|
101
|
+
//@ts-ignore
|
|
102
|
+
return (context && context.defaultView) ? context : cy.state('window').document
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// export function takeScreenshot(page: Driver): Promise<Buffer>;
|
|
106
|
+
|
|
107
|
+
// export function visit(page: Driver, url: string): Promise<void>; (??)
|
|
108
|
+
|
|
109
|
+
// export function isStaleElementError(err: any): boolean;
|
package/src/pem/server.cert
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
|
2
|
-
MIIDsDCCApigAwIBAgIJANJbHwoHZzbBMA0GCSqGSIb3DQEBCwUAMG0xCzAJBgNV
|
|
3
|
-
BAYTAkNBMRIwEAYDVQQIDAlTYW4gTWF0ZW8xEzARBgNVBAoMCkFwcGxpdG9vbHMx
|
|
4
|
-
NTAzBgNVBAMMLFNlbGYgc2lnbmVkIHNlcnZlciBmb3IgY3lwcmVzcyBleWVzIGNv
|
|
5
|
-
bW1hbmRzMB4XDTE5MDExMzA5MDU0MloXDTM5MDEwODA5MDU0MlowbTELMAkGA1UE
|
|
6
|
-
BhMCQ0ExEjAQBgNVBAgMCVNhbiBNYXRlbzETMBEGA1UECgwKQXBwbGl0b29sczE1
|
|
7
|
-
MDMGA1UEAwwsU2VsZiBzaWduZWQgc2VydmVyIGZvciBjeXByZXNzIGV5ZXMgY29t
|
|
8
|
-
bWFuZHMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDCCGfKHFApw+Cf
|
|
9
|
-
TPi8r6UG8pPI6KFNrNKCZfI0K1GNEVu5csdAaFMgPCpq+UgR87jJqra1z6LXUDWd
|
|
10
|
-
Hw7i0eAvY2k86RsQyQ8VdmOuf5MOXwJrCjlVITRbBjP3bmCcJuYgLZeDLN28JNwE
|
|
11
|
-
SBlbhAGPepDXnQGUQkpmGTisX5LXQ9V4azVJ2mMuweKIgYUVIORVaGyELdg62OOo
|
|
12
|
-
ShQna2olFsa6XLB5crTJMrplFCrb+aSc/X+P+LXET4jlz6i2gt4MwGMeJ0zELYOz
|
|
13
|
-
Dr7AhvuzmeoYYhJdVVeDYbTsYEYgAZ10UnpUcaXE3PnCIOz91dpTiXEtafH2HM1n
|
|
14
|
-
BUr652YRAgMBAAGjUzBRMB0GA1UdDgQWBBRGWnmO6FmZVz32pEX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AyOmZPuCCjoE55g1Sa8hNW
|
|
19
|
+
ma03PDGqT8PsxNE/yxmx8Y3E3fguQhVxcy5vJOVacF+Rqb9mvFDhWQvNQD4qnlrl
|
|
20
|
+
7Bm+XzyhtS7p4Xk0jfwXndMry1rjRz84b5uw20khMs21WC6CeWLwW9AttGG3Drkd
|
|
21
|
+
rvIynrE5JQLoHQZCaDhHwwKBgCPgUQiMIPltmGuKSqvnNQIZViw22631+eADto4J
|
|
22
|
+
C8B+5LSkW+67A2Yhd9+aVYqg05AwWkebKxoYfi8wht7keOrQO3jIMYINu43U7fVA
|
|
23
|
+
jzZGSDf63xoe+SnQ9PvHNjRnHjoPnk+b2V1EXnJRMqGwWGpty0tM0qLEbN8ltLW7
|
|
24
|
+
bFS9AoGARqPSEW0PpLxW5m8fnfPRVWwpTuhhWm0fkw13O8cUVIVf3E6g+MF2I9wf
|
|
25
|
+
v8yPDFyh5myoCzy8aFy4eSFeWzYTahsLDq03EyYuqIGoTJrcls9dmpxhRdPjwywJ
|
|
26
|
+
Yll894/fpK2lWI54kCEh+jRE3+S+4D3zi2txta/tu7Z891eQ5sI=
|
|
27
|
+
-----END RSA PRIVATE KEY-----
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const chalk = require('chalk');
|
|
3
|
-
const MSG = `
|
|
4
|
-
Important notice: Your Applitools visual tests are currently running with a testConcurrency value of 5.
|
|
5
|
-
This means that only up to 5 visual tests can run in parallel, and therefore the execution might be slower.
|
|
6
|
-
If your Applitools license supports a higher concurrency level, learn how to configure it here: https://www.npmjs.com/package/@applitools/eyes-cypress#concurrency.
|
|
7
|
-
Need a higher concurrency in your account? Email us @ sdr@applitools.com with your required concurrency level.`;
|
|
8
|
-
module.exports = {concurrencyMsg: chalk.yellow(MSG), msgText: MSG};
|
|
1
|
+
'use strict';
|
|
2
|
+
const chalk = require('chalk');
|
|
3
|
+
const MSG = `
|
|
4
|
+
Important notice: Your Applitools visual tests are currently running with a testConcurrency value of 5.
|
|
5
|
+
This means that only up to 5 visual tests can run in parallel, and therefore the execution might be slower.
|
|
6
|
+
If your Applitools license supports a higher concurrency level, learn how to configure it here: https://www.npmjs.com/package/@applitools/eyes-cypress#concurrency.
|
|
7
|
+
Need a higher concurrency in your account? Email us @ sdr@applitools.com with your required concurrency level.`;
|
|
8
|
+
module.exports = {concurrencyMsg: chalk.yellow(MSG), msgText: MSG};
|
package/src/plugin/config.js
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const {configParams, ConfigUtils, TypeUtils} = require('@applitools/visual-grid-client');
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (config.failCypressOnDiff === '0') {
|
|
22
|
-
config.failCypressOnDiff = false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (TypeUtils.isString(config.showLogs)) {
|
|
26
|
-
config.showLogs = config.showLogs === 'true' || config.showLogs === '1';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (TypeUtils.isString(config.testConcurrency)) {
|
|
30
|
-
config.testConcurrency = Number(config.testConcurrency);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (config.accessibilityValidation) {
|
|
34
|
-
config.accessibilitySettings = config.accessibilityValidation;
|
|
35
|
-
delete config.accessiblityValidation;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const eyesConfig = {
|
|
39
|
-
tapDirPath: config.tapDirPath,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
const {configParams, ConfigUtils, TypeUtils} = require('@applitools/visual-grid-client');
|
|
3
|
+
const DEFAULT_TEST_CONCURRENCY = 5;
|
|
4
|
+
const uuid = require('uuid');
|
|
5
|
+
|
|
6
|
+
function makeConfig() {
|
|
7
|
+
const config = ConfigUtils.getConfig({
|
|
8
|
+
configParams: [
|
|
9
|
+
...configParams,
|
|
10
|
+
'failCypressOnDiff',
|
|
11
|
+
'tapDirPath',
|
|
12
|
+
'tapFileName',
|
|
13
|
+
'disableBrowserFetching',
|
|
14
|
+
'testConcurrency',
|
|
15
|
+
],
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (!config.batch || !config.batch.id) {
|
|
19
|
+
config.batch = {id: uuid.v4(), ...config.batch};
|
|
20
|
+
}
|
|
21
|
+
if (config.failCypressOnDiff === '0') {
|
|
22
|
+
config.failCypressOnDiff = false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (TypeUtils.isString(config.showLogs)) {
|
|
26
|
+
config.showLogs = config.showLogs === 'true' || config.showLogs === '1';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (TypeUtils.isString(config.testConcurrency)) {
|
|
30
|
+
config.testConcurrency = Number(config.testConcurrency);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (config.accessibilityValidation) {
|
|
34
|
+
config.accessibilitySettings = config.accessibilityValidation;
|
|
35
|
+
delete config.accessiblityValidation;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const eyesConfig = {
|
|
39
|
+
tapDirPath: config.tapDirPath,
|
|
40
|
+
tapFileName: config.tapFileName,
|
|
41
|
+
eyesIsDisabled: !!config.isDisabled,
|
|
42
|
+
eyesBrowser: JSON.stringify(config.browser),
|
|
43
|
+
eyesLayoutBreakpoints: JSON.stringify(config.layoutBreakpoints),
|
|
44
|
+
eyesFailCypressOnDiff:
|
|
45
|
+
config.failCypressOnDiff === undefined ? true : !!config.failCypressOnDiff,
|
|
46
|
+
eyesDisableBrowserFetching: !!config.disableBrowserFetching,
|
|
47
|
+
eyesTestConcurrency: config.testConcurrency || DEFAULT_TEST_CONCURRENCY,
|
|
48
|
+
eyesWaitBeforeCapture: config.waitBeforeCapture,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return {config, eyesConfig};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
module.exports = makeConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = 7373;
|
|
1
|
+
module.exports = 7373;
|