@applitools/eyes-cypress 3.23.9 → 3.24.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2187 -2185
- package/LICENSE +25 -25
- package/README.md +778 -769
- 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/bin/eyes-setup.js +0 -21
- 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
package/README.md
CHANGED
|
@@ -1,769 +1,778 @@
|
|
|
1
|
-
# Eyes-Cypress
|
|
2
|
-
|
|
3
|
-
Applitools Eyes SDK for [Cypress](https://www.cypress.io/).
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
### Install npm package
|
|
8
|
-
|
|
9
|
-
Install Eyes-Cypress as a local dev dependency in your tested project:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm i -D @applitools/eyes-cypress
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Configure plugin and commands
|
|
16
|
-
|
|
17
|
-
#### Automatic configuration
|
|
18
|
-
|
|
19
|
-
Run the following command in your terminal:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx eyes-setup
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The above command will add the necessary imports to your cypress `pluginsFile` and `supportFile` (and create the TypeScript definitions file), as described in the manual configuration below.
|
|
26
|
-
|
|
27
|
-
#### Manual configuration
|
|
28
|
-
|
|
29
|
-
##### 1. Configure Eyes-Cypress plugin
|
|
30
|
-
|
|
31
|
-
Eyes-Cypress acts as a [Cypress plugin](https://docs.cypress.io/guides/tooling/plugins-guide.html), so it should be configured as such.
|
|
32
|
-
Unfortunately there's no easy way to do this automatically, so you need to manually add the following code to your `pluginsFile`:
|
|
33
|
-
|
|
34
|
-
**Important**: add this code **after** the definition of `module.exports`:
|
|
35
|
-
|
|
36
|
-
```js
|
|
37
|
-
require('@applitools/eyes-cypress')(module)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Normally, this is `cypress/plugins/index.js`. You can read more about it in Cypress' docs [here](https://docs.cypress.io/guides/references/configuration.html#Folders-Files).
|
|
41
|
-
|
|
42
|
-
##### 2. Configure custom commands
|
|
43
|
-
|
|
44
|
-
Eyes-Cypress exposes new commands to your tests. This means that more methods will be available on the `cy` object. To enable this, it's required to configure these custom commands.
|
|
45
|
-
As with the plugin, there's no automatic way to configure this in cypress, so you need to manually add the following code to your `supportFile`:
|
|
46
|
-
|
|
47
|
-
```js
|
|
48
|
-
import '@applitools/eyes-cypress/commands'
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Normally, this is `cypress/support/index.js`. You can read more about it in Cypress' docs [here](https://docs.cypress.io/guides/references/configuration.html#Folders-Files).
|
|
52
|
-
|
|
53
|
-
##### 3. (Optional) TypeScript configuration
|
|
54
|
-
|
|
55
|
-
Eyes-Cypress ships with official type declarations for TypeScript. This allows you to add eyes commands to your TypeScript tests.
|
|
56
|
-
|
|
57
|
-
Add this file to your project with either:
|
|
58
|
-
1. Adding the path to your [tsconfig](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file:
|
|
59
|
-
```
|
|
60
|
-
{
|
|
61
|
-
"files": ["./node_modules/@applitools/eyes-cypress/eyes-index.d.ts"],
|
|
62
|
-
...
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
2. Copying the file to to your [cypress/support/](https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Folder-Structure) dir:
|
|
66
|
-
```
|
|
67
|
-
cp node_modules/@applitools/eyes-cypress/eyes-index.d.ts ./cypress/support/
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Applitools API key
|
|
72
|
-
|
|
73
|
-
In order to authenticate via the Applitools server, you need to supply the Eyes-Cypress SDK with the API key you got from Applitools. Read more about how to obtain the API key [here](https://applitools.com/docs/topics/overview/obtain-api-key.html).
|
|
74
|
-
|
|
75
|
-
To do so, set the environment variable `APPLITOOLS_API_KEY` to the API key before running your tests.
|
|
76
|
-
For example, on Linux/Mac:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
export APPLITOOLS_API_KEY=<your_key>
|
|
80
|
-
npx cypress open
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
And on Windows:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
set APPLITOOLS_API_KEY=<your_key>
|
|
87
|
-
npx cypress open
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
It's also possible to specify the API key in the `applitools.config.js` file. The property name is `apiKey`. For example:
|
|
91
|
-
|
|
92
|
-
```js
|
|
93
|
-
module.exports = {
|
|
94
|
-
apiKey: 'YOUR_API_KEY',
|
|
95
|
-
// ...
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
See the [Advanced configuration](#method-3-the-applitoolsconfigjs-file) section below for more information on using the config file.
|
|
100
|
-
|
|
101
|
-
### Eyes server URL (optional)
|
|
102
|
-
|
|
103
|
-
In case the Eyes server is deployed at a location different than https://eyes.applitools.com, then it should be configured similarly to the Applitools API key above. To obtain the server url of your Applitools Eyes dashboard just copy the origin of its url (for example https://MY_COMPANYY.applitools.com).
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
export APPLITOOLS_SERVER_URL=<YOUR_SERVER_URL>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
It's also possible to specify the server URL in the `applitools.config.js` file. The property name is `serverUrl`. For example:
|
|
110
|
-
|
|
111
|
-
```js
|
|
112
|
-
module.exports = {
|
|
113
|
-
serverUrl: 'YOUR_SERVER_URL',
|
|
114
|
-
// ...
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## Usage
|
|
119
|
-
|
|
120
|
-
After completing the configuration (either automatic or manual) and defining the API key, you will be able to use commands from Eyes-Cypress in your cypress tests to take screenshots and use Applitools Eyes to manage them:
|
|
121
|
-
|
|
122
|
-
### Example
|
|
123
|
-
|
|
124
|
-
```js
|
|
125
|
-
describe('Hello world', () => {
|
|
126
|
-
it('works', () => {
|
|
127
|
-
cy.visit('https://applitools.com/helloworld');
|
|
128
|
-
cy.eyesOpen({
|
|
129
|
-
appName: 'Hello World!',
|
|
130
|
-
testName: 'My first JavaScript test!',
|
|
131
|
-
browser: { width: 800, height: 600 },
|
|
132
|
-
});
|
|
133
|
-
cy.eyesCheckWindow('Main Page');
|
|
134
|
-
cy.get('button').click();
|
|
135
|
-
cy.eyesCheckWindow('Click!');
|
|
136
|
-
cy.eyesClose();
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Best practice for using the SDK
|
|
142
|
-
|
|
143
|
-
Every call to `cy.eyesOpen` and `cy.eyesClose` defines a test in Applitools Eyes, and all the calls to `cy.eyesCheckWindow` between them are called "steps". In order to get a test structure in Applitools that corresponds to the test structure in Cypress, it's best to open/close tests in every `it` call. This can be done via the `beforeEach` and `afterEach` functions that Cypress provides (via the mocha test runner).
|
|
144
|
-
|
|
145
|
-
After adjusting the example above, this becomes:
|
|
146
|
-
|
|
147
|
-
```js
|
|
148
|
-
describe('Hello world', () => {
|
|
149
|
-
beforeEach(() => {
|
|
150
|
-
cy.eyesOpen({
|
|
151
|
-
appName: 'Hello World!',
|
|
152
|
-
browser: { width: 800, height: 600 },
|
|
153
|
-
});
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
afterEach(() => {
|
|
157
|
-
cy.eyesClose();
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
it('My first JavaScript test!', () => {
|
|
161
|
-
cy.visit('https://applitools.com/helloworld');
|
|
162
|
-
cy.eyesCheckWindow('Main Page');
|
|
163
|
-
cy.get('button').click();
|
|
164
|
-
cy.eyesCheckWindow('Click!');
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Applitools will take screenshots and perform the visual comparisons in the background. Performance of the tests will not be affected during the test run, but there will be a small phase at the end of the test run that waits for visual tests to end.
|
|
170
|
-
|
|
171
|
-
**Note**: In Cypress interactive mode (`cypress open`) there is a bug that exceptions in root level `after` statements don't appear in the UI. They still appear in the browser's console, and considered failures in `cypress run`. See [this issue](https://github.com/cypress-io/cypress/issues/2296) for more information and tracking.
|
|
172
|
-
|
|
173
|
-
<br/>
|
|
174
|
-
|
|
175
|
-
### Index
|
|
176
|
-
- [Commands](#Commands)
|
|
177
|
-
- [Open](#Open)
|
|
178
|
-
- [CheckWindow](#Check-window)
|
|
179
|
-
- [tag](#tag)
|
|
180
|
-
- [target](#target)
|
|
181
|
-
- [fully](#fully)
|
|
182
|
-
- [selector](#selector)
|
|
183
|
-
- [region](#region)
|
|
184
|
-
- [ignore](#ignore)
|
|
185
|
-
- [floating](#floating)
|
|
186
|
-
- [layout](#layout)
|
|
187
|
-
- [strict](#strict)
|
|
188
|
-
- [content](#content)
|
|
189
|
-
- [accessibility](#accessibility)
|
|
190
|
-
- [region in shadow DOM](#region-in-shadow-dom)
|
|
191
|
-
- [scriptHooks](#scriptHooks)
|
|
192
|
-
- [layoutBreakpoints](#layoutBreakpoints)
|
|
193
|
-
- [sendDom](#sendDom)
|
|
194
|
-
- [variationGroupId](#variationGroupId)
|
|
195
|
-
- [waitBeforeCapture](#waitBeforeCapture)
|
|
196
|
-
- [Close](#Close)
|
|
197
|
-
- [
|
|
198
|
-
- [
|
|
199
|
-
|
|
200
|
-
- [
|
|
201
|
-
- [
|
|
202
|
-
|
|
203
|
-
- [
|
|
204
|
-
- [
|
|
205
|
-
- [
|
|
206
|
-
|
|
207
|
-
- [
|
|
208
|
-
|
|
209
|
-
- [
|
|
210
|
-
- [
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
{
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
{
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
{
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
{
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
{accessibilityType: '
|
|
385
|
-
{accessibilityType: '
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
|
550
|
-
|
|
|
551
|
-
| `
|
|
552
|
-
| `
|
|
553
|
-
| `
|
|
554
|
-
| `
|
|
555
|
-
| `
|
|
556
|
-
| `
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
|
565
|
-
|
|
|
566
|
-
| `
|
|
567
|
-
| `
|
|
568
|
-
| `
|
|
569
|
-
| `
|
|
570
|
-
| `
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
|
579
|
-
|
|
|
580
|
-
| `
|
|
581
|
-
| `
|
|
582
|
-
| `
|
|
583
|
-
| `
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
- `
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
- `
|
|
658
|
-
- `firefox
|
|
659
|
-
- `
|
|
660
|
-
- `
|
|
661
|
-
- `
|
|
662
|
-
- `
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
```
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
```
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
1
|
+
# Eyes-Cypress
|
|
2
|
+
|
|
3
|
+
Applitools Eyes SDK for [Cypress](https://www.cypress.io/).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Install npm package
|
|
8
|
+
|
|
9
|
+
Install Eyes-Cypress as a local dev dependency in your tested project:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i -D @applitools/eyes-cypress
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Configure plugin and commands
|
|
16
|
+
|
|
17
|
+
#### Automatic configuration
|
|
18
|
+
|
|
19
|
+
Run the following command in your terminal:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx eyes-setup
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The above command will add the necessary imports to your cypress `pluginsFile` and `supportFile` (and create the TypeScript definitions file), as described in the manual configuration below.
|
|
26
|
+
|
|
27
|
+
#### Manual configuration
|
|
28
|
+
|
|
29
|
+
##### 1. Configure Eyes-Cypress plugin
|
|
30
|
+
|
|
31
|
+
Eyes-Cypress acts as a [Cypress plugin](https://docs.cypress.io/guides/tooling/plugins-guide.html), so it should be configured as such.
|
|
32
|
+
Unfortunately there's no easy way to do this automatically, so you need to manually add the following code to your `pluginsFile`:
|
|
33
|
+
|
|
34
|
+
**Important**: add this code **after** the definition of `module.exports`:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
require('@applitools/eyes-cypress')(module)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Normally, this is `cypress/plugins/index.js`. You can read more about it in Cypress' docs [here](https://docs.cypress.io/guides/references/configuration.html#Folders-Files).
|
|
41
|
+
|
|
42
|
+
##### 2. Configure custom commands
|
|
43
|
+
|
|
44
|
+
Eyes-Cypress exposes new commands to your tests. This means that more methods will be available on the `cy` object. To enable this, it's required to configure these custom commands.
|
|
45
|
+
As with the plugin, there's no automatic way to configure this in cypress, so you need to manually add the following code to your `supportFile`:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import '@applitools/eyes-cypress/commands'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Normally, this is `cypress/support/index.js`. You can read more about it in Cypress' docs [here](https://docs.cypress.io/guides/references/configuration.html#Folders-Files).
|
|
52
|
+
|
|
53
|
+
##### 3. (Optional) TypeScript configuration
|
|
54
|
+
|
|
55
|
+
Eyes-Cypress ships with official type declarations for TypeScript. This allows you to add eyes commands to your TypeScript tests.
|
|
56
|
+
|
|
57
|
+
Add this file to your project with either:
|
|
58
|
+
1. Adding the path to your [tsconfig](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file:
|
|
59
|
+
```
|
|
60
|
+
{
|
|
61
|
+
"files": ["./node_modules/@applitools/eyes-cypress/eyes-index.d.ts"],
|
|
62
|
+
...
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
2. Copying the file to to your [cypress/support/](https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Folder-Structure) dir:
|
|
66
|
+
```
|
|
67
|
+
cp node_modules/@applitools/eyes-cypress/eyes-index.d.ts ./cypress/support/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Applitools API key
|
|
72
|
+
|
|
73
|
+
In order to authenticate via the Applitools server, you need to supply the Eyes-Cypress SDK with the API key you got from Applitools. Read more about how to obtain the API key [here](https://applitools.com/docs/topics/overview/obtain-api-key.html).
|
|
74
|
+
|
|
75
|
+
To do so, set the environment variable `APPLITOOLS_API_KEY` to the API key before running your tests.
|
|
76
|
+
For example, on Linux/Mac:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
export APPLITOOLS_API_KEY=<your_key>
|
|
80
|
+
npx cypress open
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
And on Windows:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
set APPLITOOLS_API_KEY=<your_key>
|
|
87
|
+
npx cypress open
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
It's also possible to specify the API key in the `applitools.config.js` file. The property name is `apiKey`. For example:
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
module.exports = {
|
|
94
|
+
apiKey: 'YOUR_API_KEY',
|
|
95
|
+
// ...
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
See the [Advanced configuration](#method-3-the-applitoolsconfigjs-file) section below for more information on using the config file.
|
|
100
|
+
|
|
101
|
+
### Eyes server URL (optional)
|
|
102
|
+
|
|
103
|
+
In case the Eyes server is deployed at a location different than https://eyes.applitools.com, then it should be configured similarly to the Applitools API key above. To obtain the server url of your Applitools Eyes dashboard just copy the origin of its url (for example https://MY_COMPANYY.applitools.com).
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
export APPLITOOLS_SERVER_URL=<YOUR_SERVER_URL>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
It's also possible to specify the server URL in the `applitools.config.js` file. The property name is `serverUrl`. For example:
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
module.exports = {
|
|
113
|
+
serverUrl: 'YOUR_SERVER_URL',
|
|
114
|
+
// ...
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Usage
|
|
119
|
+
|
|
120
|
+
After completing the configuration (either automatic or manual) and defining the API key, you will be able to use commands from Eyes-Cypress in your cypress tests to take screenshots and use Applitools Eyes to manage them:
|
|
121
|
+
|
|
122
|
+
### Example
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
describe('Hello world', () => {
|
|
126
|
+
it('works', () => {
|
|
127
|
+
cy.visit('https://applitools.com/helloworld');
|
|
128
|
+
cy.eyesOpen({
|
|
129
|
+
appName: 'Hello World!',
|
|
130
|
+
testName: 'My first JavaScript test!',
|
|
131
|
+
browser: { width: 800, height: 600 },
|
|
132
|
+
});
|
|
133
|
+
cy.eyesCheckWindow('Main Page');
|
|
134
|
+
cy.get('button').click();
|
|
135
|
+
cy.eyesCheckWindow('Click!');
|
|
136
|
+
cy.eyesClose();
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Best practice for using the SDK
|
|
142
|
+
|
|
143
|
+
Every call to `cy.eyesOpen` and `cy.eyesClose` defines a test in Applitools Eyes, and all the calls to `cy.eyesCheckWindow` between them are called "steps". In order to get a test structure in Applitools that corresponds to the test structure in Cypress, it's best to open/close tests in every `it` call. This can be done via the `beforeEach` and `afterEach` functions that Cypress provides (via the mocha test runner).
|
|
144
|
+
|
|
145
|
+
After adjusting the example above, this becomes:
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
describe('Hello world', () => {
|
|
149
|
+
beforeEach(() => {
|
|
150
|
+
cy.eyesOpen({
|
|
151
|
+
appName: 'Hello World!',
|
|
152
|
+
browser: { width: 800, height: 600 },
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
afterEach(() => {
|
|
157
|
+
cy.eyesClose();
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('My first JavaScript test!', () => {
|
|
161
|
+
cy.visit('https://applitools.com/helloworld');
|
|
162
|
+
cy.eyesCheckWindow('Main Page');
|
|
163
|
+
cy.get('button').click();
|
|
164
|
+
cy.eyesCheckWindow('Click!');
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Applitools will take screenshots and perform the visual comparisons in the background. Performance of the tests will not be affected during the test run, but there will be a small phase at the end of the test run that waits for visual tests to end.
|
|
170
|
+
|
|
171
|
+
**Note**: In Cypress interactive mode (`cypress open`) there is a bug that exceptions in root level `after` statements don't appear in the UI. They still appear in the browser's console, and considered failures in `cypress run`. See [this issue](https://github.com/cypress-io/cypress/issues/2296) for more information and tracking.
|
|
172
|
+
|
|
173
|
+
<br/>
|
|
174
|
+
|
|
175
|
+
### Index
|
|
176
|
+
- [Commands](#Commands)
|
|
177
|
+
- [Open](#Open)
|
|
178
|
+
- [CheckWindow](#Check-window)
|
|
179
|
+
- [tag](#tag)
|
|
180
|
+
- [target](#target)
|
|
181
|
+
- [fully](#fully)
|
|
182
|
+
- [selector](#selector)
|
|
183
|
+
- [region](#region)
|
|
184
|
+
- [ignore](#ignore)
|
|
185
|
+
- [floating](#floating)
|
|
186
|
+
- [layout](#layout)
|
|
187
|
+
- [strict](#strict)
|
|
188
|
+
- [content](#content)
|
|
189
|
+
- [accessibility](#accessibility)
|
|
190
|
+
- [region in shadow DOM](#region-in-shadow-dom)
|
|
191
|
+
- [scriptHooks](#scriptHooks)
|
|
192
|
+
- [layoutBreakpoints](#layoutBreakpoints)
|
|
193
|
+
- [sendDom](#sendDom)
|
|
194
|
+
- [variationGroupId](#variationGroupId)
|
|
195
|
+
- [waitBeforeCapture](#waitBeforeCapture)
|
|
196
|
+
- [Close](#Close)
|
|
197
|
+
- [GetAllTestResults](#GetAllTestResults)
|
|
198
|
+
- [Concurrency](#Concurrency)
|
|
199
|
+
- [Advanced configuration](#Advanced-configuration)
|
|
200
|
+
- [Scoped configuration](#Here-are-the-available-configuration-properties)
|
|
201
|
+
- [Global configuration](#global-configuration-properties)
|
|
202
|
+
- [Examples](#Method-1-Arguments-for-cyeyesOpen)
|
|
203
|
+
- [Arguments for `cy.eyesOpen`](#Method-1-Arguments-for-cyeyesOpen)
|
|
204
|
+
- [Environment variables](#Method-2-Environment-variables)
|
|
205
|
+
- [The `applitools.config.js` file](#Method-3-The-applitoolsconfigjs-file)
|
|
206
|
+
- [Configuring the browser](#Configuring-the-browser)
|
|
207
|
+
- [Device emulation](#Device-emulation)
|
|
208
|
+
- [IDE Code Completion](#Intelligent-Code-Completion)
|
|
209
|
+
- [Triple slash directives](#1-Triple-slash-directives)
|
|
210
|
+
- [Reference type declarations via `tsconfig`](#2-Reference-type-declarations-via-tsconfig)
|
|
211
|
+
- [Troubleshooting](#Troubleshooting)
|
|
212
|
+
|
|
213
|
+
<br/><hr/><br/>
|
|
214
|
+
|
|
215
|
+
### Commands
|
|
216
|
+
|
|
217
|
+
In addition to the built-in commands provided by Cypress, like `cy.visit` and `cy.get`, Eyes-Cypress defines new custom commands, which enable the visual testing with Applitools Eyes. These commands are:
|
|
218
|
+
|
|
219
|
+
#### Open
|
|
220
|
+
|
|
221
|
+
Create an Applitools test.
|
|
222
|
+
This will start a session with the Applitools server.
|
|
223
|
+
|
|
224
|
+
```js
|
|
225
|
+
cy.eyesOpen({
|
|
226
|
+
appName: '',
|
|
227
|
+
testName: ''
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
It's possible to pass a config object to `eyesOpen` with all the possible configuration properties. Read the [Advanced configuration](#advanced-configuration) section for a detailed description.
|
|
232
|
+
|
|
233
|
+
#### Check window
|
|
234
|
+
|
|
235
|
+
Generate a screenshot of the current page and add it to the Applitools Test.
|
|
236
|
+
|
|
237
|
+
```js
|
|
238
|
+
cy.eyesCheckWindow('Login screen')
|
|
239
|
+
|
|
240
|
+
OR
|
|
241
|
+
|
|
242
|
+
cy.eyesCheckWindow({ tag: 'Login screen', target: 'your target' })
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
##### Arguments to `cy.eyesCheckWindow`
|
|
246
|
+
|
|
247
|
+
##### `tag`
|
|
248
|
+
|
|
249
|
+
(optional): A logical name for this check.
|
|
250
|
+
|
|
251
|
+
##### `target`
|
|
252
|
+
|
|
253
|
+
(optional): Possible values are:
|
|
254
|
+
<br/> 1. `window`
|
|
255
|
+
This is the default value. If set then the captured image is of the entire page or the viewport, use [`fully`](#fully) for specifying what `window` mode to use.
|
|
256
|
+
<br/>2. `region`
|
|
257
|
+
If set then the captured image is of the parts of the page, use this parameter with [`region`](#region) or [`selector`](#selector) for specifying the areas to captured.
|
|
258
|
+
|
|
259
|
+
##### `fully`
|
|
260
|
+
|
|
261
|
+
(optional) In case [`target`](#target) is `window`, if `fully` is `true` (default) then the snapshot is of the entire page, if `fully` is `false` then snapshot is of the viewport.
|
|
262
|
+
|
|
263
|
+
```js
|
|
264
|
+
// Capture viewport only
|
|
265
|
+
cy.eyesCheckWindow({
|
|
266
|
+
target: 'window',
|
|
267
|
+
fully: false,
|
|
268
|
+
});
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
##### `selector`
|
|
272
|
+
|
|
273
|
+
(optional): In case [`target`](#target) is `region`, this should be the actual css or xpath selector to an element, and the screenshot would be the content of that element. For example:
|
|
274
|
+
|
|
275
|
+
```js
|
|
276
|
+
// Using a css selector
|
|
277
|
+
cy.eyesCheckWindow({
|
|
278
|
+
target: 'region',
|
|
279
|
+
selector: {
|
|
280
|
+
type: 'css',
|
|
281
|
+
selector: '.my-element' // or '//button'
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
// Using an xpath selector
|
|
286
|
+
cy.eyesCheckWindow({
|
|
287
|
+
target: 'region',
|
|
288
|
+
selector: {
|
|
289
|
+
type: 'xpath',
|
|
290
|
+
selector: '//button[1]'
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
// The shorthand string version defaults to css selectors
|
|
295
|
+
cy.eyesCheckWindow({
|
|
296
|
+
target: 'region',
|
|
297
|
+
selector: '.my-element'
|
|
298
|
+
});
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
##### `region`
|
|
302
|
+
|
|
303
|
+
(optional): In case [`target`](#target) is `region`, this should be an object describing the region's coordinates for capturing the image. For example:
|
|
304
|
+
|
|
305
|
+
```js
|
|
306
|
+
cy.eyesCheckWindow({
|
|
307
|
+
target: 'region',
|
|
308
|
+
region: {top: 100, left: 0, width: 1000, height: 200}
|
|
309
|
+
});
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
##### `ignore`
|
|
313
|
+
|
|
314
|
+
(optional): A single or an array of regions to ignore when checking for visual differences. For example:
|
|
315
|
+
|
|
316
|
+
```js
|
|
317
|
+
cy.eyesCheckWindow({
|
|
318
|
+
ignore: [
|
|
319
|
+
{top: 100, left: 0, width: 1000, height: 100},
|
|
320
|
+
{selector: '.some-div-to-ignore'}
|
|
321
|
+
]
|
|
322
|
+
});
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
##### `floating`
|
|
326
|
+
|
|
327
|
+
(optional): A single or an array of floating regions to ignore when checking for visual differences. More information about floating regions can be found in Applitools docs [here](https://help.applitools.com/hc/en-us/articles/360006915292-Testing-of-floating-UI-elements). For example:
|
|
328
|
+
|
|
329
|
+
```js
|
|
330
|
+
cy.eyesCheckWindow({
|
|
331
|
+
floating: [
|
|
332
|
+
{top: 100, left: 0, width: 1000, height: 100, maxUpOffset: 20, maxDownOffset: 20, maxLeftOffset: 20, maxRightOffset: 20},
|
|
333
|
+
{selector: '.some-div-to-float', maxUpOffset: 20, maxDownOffset: 20, maxLeftOffset: 20, maxRightOffset: 20}
|
|
334
|
+
]
|
|
335
|
+
});
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
##### `layout`
|
|
339
|
+
|
|
340
|
+
(optional): A single or an array of regions to match as [layout level.](https://help.applitools.com/hc/en-us/articles/360007188591-Match-Levels) For example:
|
|
341
|
+
|
|
342
|
+
```js
|
|
343
|
+
cy.eyesCheckWindow({
|
|
344
|
+
layout: [
|
|
345
|
+
{top: 100, left: 0, width: 1000, height: 100},
|
|
346
|
+
{selector: '.some-div-to-test-as-layout'}
|
|
347
|
+
]
|
|
348
|
+
});
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
##### `strict`
|
|
352
|
+
|
|
353
|
+
(optional): A single or an array of regions to match as [strict level.](https://help.applitools.com/hc/en-us/articles/360007188591-Match-Levels) For example:
|
|
354
|
+
|
|
355
|
+
```js
|
|
356
|
+
cy.eyesCheckWindow({
|
|
357
|
+
strict: [
|
|
358
|
+
{top: 100, left: 0, width: 1000, height: 100},
|
|
359
|
+
{selector: '.some-div-to-test-as-strict'}
|
|
360
|
+
]
|
|
361
|
+
});
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
##### `content`
|
|
365
|
+
|
|
366
|
+
(optional): A single or an array of regions to match as [content level.](https://help.applitools.com/hc/en-us/articles/360007188591-Match-Levels) For example:
|
|
367
|
+
|
|
368
|
+
```js
|
|
369
|
+
cy.eyesCheckWindow({
|
|
370
|
+
content: [
|
|
371
|
+
{top: 100, left: 0, width: 1000, height: 100},
|
|
372
|
+
{selector: '.some-div-to-test-as-content'}
|
|
373
|
+
]
|
|
374
|
+
});
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
##### `accessibility`
|
|
378
|
+
|
|
379
|
+
(optional): A single or an array of regions to perform accessibility checks, For example:
|
|
380
|
+
|
|
381
|
+
```js
|
|
382
|
+
cy.eyesCheckWindow({
|
|
383
|
+
accessibility: [
|
|
384
|
+
{accessibilityType: 'RegularText', selector: '.some-div'},
|
|
385
|
+
{accessibilityType: 'LargeText', selector: '//*[@id="main"]/h1', type: 'xpath'},
|
|
386
|
+
{accessibilityType: 'BoldText', top: 100, left: 0, width: 1000, height: 100},
|
|
387
|
+
]
|
|
388
|
+
});
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Possible accessibilityType values are: `IgnoreContrast`,`RegularText`,`LargeText`,`BoldText` and `GraphicalObject`.
|
|
392
|
+
|
|
393
|
+
##### `region in shadow DOM`
|
|
394
|
+
|
|
395
|
+
When the target region is within shadow DOM, there is a need to specify the path to that region by passing an array of selectors. Each entry in the array should contain a `json` with the following entries: `type:css` ***only***, `selector` and `nodeType`. The element that contains the `shadowRoot` should be specified as `nodeType:'shadow-root'` and the final target region should contain `nodeType:'element'`
|
|
396
|
+
|
|
397
|
+
```js
|
|
398
|
+
cy.eyesCheckWindow({
|
|
399
|
+
target: 'region',
|
|
400
|
+
selector: [{
|
|
401
|
+
type: 'css',
|
|
402
|
+
selector: 'ContainShadowRoot' ,
|
|
403
|
+
nodeType: 'shadow-root'
|
|
404
|
+
},{
|
|
405
|
+
type: 'css',
|
|
406
|
+
selector: 'targetRegion',
|
|
407
|
+
nodeType: 'element'
|
|
408
|
+
}]
|
|
409
|
+
});
|
|
410
|
+
```
|
|
411
|
+
##### `scriptHooks`
|
|
412
|
+
|
|
413
|
+
(optional): A set of scripts to be run by the browser during the rendering. It is intended to be used as a means to alter the page's state and structure at the time of rendering.
|
|
414
|
+
An object with the following properties:
|
|
415
|
+
* ##### `beforeCaptureScreenshot`: a script that runs after the page is loaded but before taking the screenshot. For example:
|
|
416
|
+
|
|
417
|
+
```js
|
|
418
|
+
cy.eyesCheckWindow({
|
|
419
|
+
scriptHooks: {
|
|
420
|
+
beforeCaptureScreenshot: "document.body.style.backgroundColor = 'gold'"
|
|
421
|
+
}
|
|
422
|
+
})
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
##### `layoutBreakpoints`
|
|
426
|
+
(optional): An array of viewport widths to use in order to take different sized dom captures.
|
|
427
|
+
It can also be specified as a boolean, at which point we will take dom captures using the device/browser widths configured.
|
|
428
|
+
Responsive pages display different content depending on the viewport's width, so this option can be used to instruct `eyes` to take dom captures using those widths, and test all responsive variations of your page.
|
|
429
|
+
|
|
430
|
+
Note that this option can also be specificed in `eyesOpen` or globally in `applitools.config.js`.
|
|
431
|
+
|
|
432
|
+
```js
|
|
433
|
+
cy.eyesCheckWindow({
|
|
434
|
+
layoutBreakpoints: [500, 1000]
|
|
435
|
+
});
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
##### `sendDom`
|
|
439
|
+
|
|
440
|
+
(optional): A flag to specify whether a capture of DOM and CSS should be taken when rendering the screenshot. The default value is true. This should only be modified to troubleshoot unexpected behavior, and not for normal production use.
|
|
441
|
+
|
|
442
|
+
```js
|
|
443
|
+
cy.eyesCheckWindow({sendDom: false})
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
##### `variationGroupId`
|
|
447
|
+
|
|
448
|
+
```js
|
|
449
|
+
cy.eyesCheckWindow({variationGroupId: 'Login screen variation #1'})
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
For more information, visit our documentation page: https://applitools.com/docs/features/baseline-variations-groups.html
|
|
453
|
+
|
|
454
|
+
##### `waitBeforeCapture`
|
|
455
|
+
|
|
456
|
+
A parameter that is set to wait a certain amount of milliseconds before capturing the pages snapshot. This will also apply between page resizes when using `layoutBreakpoints`.
|
|
457
|
+
|
|
458
|
+
```
|
|
459
|
+
cy.eyesOpen({
|
|
460
|
+
waitBeforeCapture: 1000
|
|
461
|
+
// ...
|
|
462
|
+
})
|
|
463
|
+
|
|
464
|
+
cy.eyesCheckWindow({
|
|
465
|
+
waitBeforeCapture: 1000
|
|
466
|
+
})
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
##### `useDom`
|
|
470
|
+
|
|
471
|
+
<!-- TODO add explanation -->
|
|
472
|
+
|
|
473
|
+
```js
|
|
474
|
+
cy.eyesCheckWindow({useDom: true})
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
##### `enablePatterns`
|
|
478
|
+
|
|
479
|
+
<!-- TODO add explanation -->
|
|
480
|
+
|
|
481
|
+
```js
|
|
482
|
+
cy.eyesCheckWindow({enablePatterns: true})
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
##### `matchLevel`
|
|
486
|
+
|
|
487
|
+
<!-- TODO add explanation -->
|
|
488
|
+
|
|
489
|
+
```js
|
|
490
|
+
cy.eyesCheckWindow({matchLevel: 'Layout'})
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
The different matchLevels are specified here: https://github.com/applitools/eyes.sdk.javascript1/blob/master/packages/eyes-sdk-core/lib/config/MatchLevel.js
|
|
494
|
+
|
|
495
|
+
##### `visualGridOptions`
|
|
496
|
+
|
|
497
|
+
An object that specifies options to configure renderings on the Ultrafast grid.
|
|
498
|
+
Available options:
|
|
499
|
+
|
|
500
|
+
* `polyfillAdoptedStyleSheets`: Creates a polyfill when the DOM contains `adoptedStyleSheets` ([reference](https://developers.google.com/web/updates/2019/02/constructable-stylesheets)) for browsers that don't support it (It is currently supported only in Chrome). When `true`, those browsers will successfully include the css as inline style tags. When `false`, the css will not be included. When `undefined`, an error will be thrown with a message stating that this feature is not supported in the desired browser.
|
|
501
|
+
|
|
502
|
+
```js
|
|
503
|
+
cy.eyesCheckWindow({
|
|
504
|
+
visualGridOptions: {
|
|
505
|
+
polyfillAdoptedStyleSheets: true
|
|
506
|
+
}
|
|
507
|
+
})
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
#### Close
|
|
511
|
+
|
|
512
|
+
Close the applitools test and check that all screenshots are valid.
|
|
513
|
+
|
|
514
|
+
It is important to call this at the end of each test, symmetrically to `eyesOpen`(or in `afterEach()`, see [Best practice for using the SDK](#best-practice-for-using-the-sdk)).
|
|
515
|
+
|
|
516
|
+
Close receives no arguments.
|
|
517
|
+
|
|
518
|
+
```js
|
|
519
|
+
cy.eyesClose();
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
#### GetAllTestResults
|
|
523
|
+
|
|
524
|
+
Returns an object with the applitools test results from a given test / test file.
|
|
525
|
+
This should be called after `close`
|
|
526
|
+
|
|
527
|
+
```js
|
|
528
|
+
cy.eyesGetAllTestResults()
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
## Concurrency
|
|
532
|
+
|
|
533
|
+
The default level of concurrency for free accounts is `5`. This means that only up to 5 visual tests can run in parallel, and therefore the execution might be slow.
|
|
534
|
+
If your account does support a higher level of concurrency, it's possible to pass a different value by specifying it in the property `testConcurrency` in the applitools.config.js file (see [Advanced configuration](#advanced-configuration) section below).
|
|
535
|
+
|
|
536
|
+
If you are interested in speeding up your visual tests, contact sdr@applitools.com to get a trial account and faster tests with more concurrency.
|
|
537
|
+
|
|
538
|
+
## Advanced configuration
|
|
539
|
+
|
|
540
|
+
There are 3 ways to specify test configuration:
|
|
541
|
+
1) Arguments to `cy.eyesOpen()`
|
|
542
|
+
2) Environment variables
|
|
543
|
+
3) The `applitools.config.js` file
|
|
544
|
+
|
|
545
|
+
The list above is also the order of precedence, which means that if you pass a property to `cy.eyesOpen` it will override the environment variable, and the environment variable will override the value defined in the `applitools.config.js` file.
|
|
546
|
+
|
|
547
|
+
### Here are the available configuration properties:
|
|
548
|
+
|
|
549
|
+
| Property name | Default value | Description |
|
|
550
|
+
| ------------- |:------------- |:----------- |
|
|
551
|
+
| `testName` | The value of Cypress's test title | Test name. If this is not specified, the test name will be the title of the `it` block where the test is running. |
|
|
552
|
+
| `browser` | { width: 800, height: 600, name: 'chrome' } | The size and browser of the generated screenshots. This doesn't need to be the same as the browser that Cypress is running. It could be a different size and also a different browser. For more info and possible values, see the [browser section below](#configuring-the-browser).|
|
|
553
|
+
| `batchId` | random | Provides ability to group tests into batches. Read more about batches [here](https://applitools.com/docs/topics/working-with-test-batches/how-to-group-tests-into-batches.html). |
|
|
554
|
+
| `batchName` | The name of the first test in the batch | Provides a name to the batch (for display purpose only). |
|
|
555
|
+
| `batchSequenceName` | undefined | Name for managing batch statistics. |
|
|
556
|
+
| `baselineEnvName` | undefined | The name of the environment of the baseline. |
|
|
557
|
+
| `envName` | undefined | A name for the environment in which the application under test is running. |
|
|
558
|
+
| `ignoreCaret` | false | Whether to ignore or the blinking caret or not when comparing images. |
|
|
559
|
+
| `matchLevel` | Strict | The method to use when comparing two screenshots, which expresses the extent to which the two images are expected to match. Possible values are `Strict`, `Exact`, `Layout` and `Content`. Read more about match levels [here](http://support.applitools.com/customer/portal/articles/2088359). |
|
|
560
|
+
| `baselineBranchName` | undefined | The name of the baseline branch. |
|
|
561
|
+
| `parentBranchName` | undefined | Sets the branch under which new branches are created. |
|
|
562
|
+
| `saveFailedTests` | false | Set whether or not failed tests are saved by default. |
|
|
563
|
+
| `saveNewTests` | false | Set whether or not new tests are saved by default. |
|
|
564
|
+
| `properties` | undefined | Custom properties for the eyes test. The format is an array of objects with name/value properties. For example: `[{name: 'My prop', value:'My value'}]`. |
|
|
565
|
+
| `ignoreDisplacements` | false | Sets whether Test Manager should intially display mismatches for image features that have only been displaced, as opposed to real mismatches. |
|
|
566
|
+
| `compareWithParentBranch` | false | |
|
|
567
|
+
| `ignoreBaseline` | false | |
|
|
568
|
+
| `notifyOnCompletion` | false | If `true` batch completion notifications are sent. |
|
|
569
|
+
| `accessibilityValidation` | undefined | An object that specifies the accessibility level and guidelines version to use for the screenshots. Possible values for **level** are `None`, `AA` and `AAA`, and possible values for **guidelinesVersion** are `WCAG_2_0` and `WCAG_2_1`. For example: `{level: 'AA', guidelinesVersion: 'WCAG_2_0'}`|
|
|
570
|
+
| `visualGridOptions` | undefined | An object that specifies options to configure renderings on the Ultrafast grid. See more information [here](#visualgridoptions) |
|
|
571
|
+
|`layoutBreakpoints`| undefined | When set to `true`, a snapshot of the DOM will be taken once for each browser/device size in the `browser` configuration. For optimization purposes, an array of numbers can be passed. The DOM snapshot will be taken once for every **width** in the array. For more information, see [layoutBreakpoints](#layoutBreakpoints)|
|
|
572
|
+
|`waitBeforeCapture`| 100 | A parameter that is set to wait a certain amount of milliseconds before capturing the pages snapshot. This will also apply between page resizes when using `layoutBreakpoints`.
|
|
573
|
+
|
|
574
|
+
### Global configuration properties:
|
|
575
|
+
|
|
576
|
+
The following configuration properties cannot be defined using the first method of passing them to `cy.eyesOpen`. They should be defined either in the `applitools.config.js` file or as environment variables.
|
|
577
|
+
|
|
578
|
+
| Property name | Default value | Description |
|
|
579
|
+
| ------------- |:------------- |:----------- |
|
|
580
|
+
| `apiKey` | undefined | The API key used for working with the Applitools Eyes server. See more info in the [Applitools API key](#applitools-api-key) section above |
|
|
581
|
+
| `showLogs` | false | Whether or not you want to see logs of the Eyes-Cypress plugin. Logs are written to the same output of the Cypress process. |
|
|
582
|
+
| `serverUrl` | Default Eyes server URL | The URL of Eyes server |
|
|
583
|
+
| `proxy` | undefined | Sets the proxy settings to be used in network requests to Eyes server. This can be either a string to the proxy URI, or an object containing the URI, username and password.<br/><br/>For example:<br/>`{url: 'https://myproxy.com:443', username: 'my_user', password: 'my_password', isHttpOnly: false}`<br/>or:<br/>`"https://username:password@myproxy.com:443"`|
|
|
584
|
+
| `isDisabled` | false | If true, all calls to Eyes-Cypress commands will be silently ignored. |
|
|
585
|
+
| `failCypressOnDiff` | true | If true, then the Cypress test fails if an eyes visual test fails. If false and an eyes test fails, then the Cypress test does not fail.
|
|
586
|
+
| `tapDirPath` | undefined | Directory path of a results file. If set, then a [TAP](https://en.wikipedia.org/wiki/Test_Anything_Protocol#Specification) file is created in this directory, the tap file name is created with the name [ISO-DATE](https://en.wikipedia.org/wiki/ISO_8601)\-eyes.tap and contains the Eyes test results (Note that because of a current Cypress [limitation](https://github.com/cypress-io/cypress-documentation/issues/818) the results are scoped per spec file, this means that the results file is created once for each spec file).|
|
|
587
|
+
| `tapFileName` | [ISO-DATE](https://en.wikipedia.org/wiki/ISO_8601)\-eyes.tap | The name of the tap file that is created in case `tapDirPath` is set
|
|
588
|
+
| `testConcurrency` | 5 | The maximum number of tests that can run concurrently. The default value is the allowed amount for free accounts. For paid accounts, set this number to the quota set for your account. |
|
|
589
|
+
|`dontCloseBatches`| false | If true, batches are not closed for [notifyOnCompletion](#advanced-configuration).|
|
|
590
|
+
|`disableBrowserFetching`| false | If true, page resources for rendering on the UFG will be fetched from outside of the browser.|
|
|
591
|
+
|`enablePatterns`| false | |
|
|
592
|
+
|`useDom`| false | |
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
### Method 1: Arguments for `cy.eyesOpen`
|
|
596
|
+
|
|
597
|
+
Pass a config object as the only argument. For example:
|
|
598
|
+
|
|
599
|
+
```js
|
|
600
|
+
cy.eyesOpen({
|
|
601
|
+
appName: 'My app',
|
|
602
|
+
batchName: 'My batch',
|
|
603
|
+
...
|
|
604
|
+
// all other configuration variables apply
|
|
605
|
+
})
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### Method 2: Environment variables
|
|
609
|
+
|
|
610
|
+
The name of the corresponding environment variable is in uppercase, with the `APPLITOOLS_` prefix, and separating underscores instead of camel case:
|
|
611
|
+
|
|
612
|
+
```js
|
|
613
|
+
APPLITOOLS_APP_NAME
|
|
614
|
+
APPLITOOLS_SHOW_LOGS
|
|
615
|
+
APPLITOOLS_CONCURRENCY
|
|
616
|
+
APPLITOOLS_SAVE_DEBUG_DATA
|
|
617
|
+
APPLITOOLS_BATCH_ID
|
|
618
|
+
APPLITOOLS_BATCH_NAME
|
|
619
|
+
APPLITOOLS_BATCH_SEQUENCE_NAME
|
|
620
|
+
APPLITOOLS_BASELINE_ENV_NAME
|
|
621
|
+
APPLITOOLS_ENV_NAME
|
|
622
|
+
APPLITOOLS_IGNORE_CARET
|
|
623
|
+
APPLITOOLS_IS_DISABLED
|
|
624
|
+
APPLITOOLS_MATCH_LEVEL
|
|
625
|
+
APPLITOOLS_BRANCH_NAME
|
|
626
|
+
APPLITOOLS_BASELINE_BRANCH_NAME
|
|
627
|
+
APPLITOOLS_PARENT_BRANCH_NAME
|
|
628
|
+
APPLITOOLS_SAVE_FAILED_TESTS
|
|
629
|
+
APPLITOOLS_SAVE_NEW_TESTS
|
|
630
|
+
APPLITOOLS_COMPARE_WITH_PARENT_BRANCH
|
|
631
|
+
APPLITOOLS_IGNORE_BASELINE
|
|
632
|
+
APPLITOOLS_SERVER_URL
|
|
633
|
+
APPLITOOLS_PROXY
|
|
634
|
+
APPLITOOLS_NOTIFY_ON_COMPLETION
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
### Method 3: The `applitools.config.js` file
|
|
638
|
+
|
|
639
|
+
It's possible to have a file called `applitools.config.js` at the same folder location as `cypress.json`. In this file specify the desired configuration, in a valid JSON format. For example:
|
|
640
|
+
|
|
641
|
+
```js
|
|
642
|
+
module.exports = {
|
|
643
|
+
appName: 'My app',
|
|
644
|
+
showLogs: true,
|
|
645
|
+
batchName: 'My batch'
|
|
646
|
+
...
|
|
647
|
+
// all other configuration variables apply
|
|
648
|
+
}
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
## Configuring the browser
|
|
652
|
+
|
|
653
|
+
Eyes-Cypress will take a screenshot of the page in the requested browser, the browser can be set in the `applitools.config.js` or by passing it to `cy.eyesOpen`.
|
|
654
|
+
|
|
655
|
+
Possible values are:
|
|
656
|
+
|
|
657
|
+
- `chrome`
|
|
658
|
+
- `firefox`
|
|
659
|
+
- `edgechromium`
|
|
660
|
+
- `edgelegacy`
|
|
661
|
+
- `ie10`
|
|
662
|
+
- `ie11`
|
|
663
|
+
- `safari`
|
|
664
|
+
- `chrome-one-version-back`
|
|
665
|
+
- `chrome-two-versions-back`
|
|
666
|
+
- `firefox-one-version-back`
|
|
667
|
+
- `firefox-two-versions-back`
|
|
668
|
+
- `safari-one-version-back`
|
|
669
|
+
- `safari-two-versions-back`
|
|
670
|
+
- `edgechromium-one-version-back`
|
|
671
|
+
- `edgechromium-two-versions-back`
|
|
672
|
+
|
|
673
|
+
### Previous browser versions
|
|
674
|
+
|
|
675
|
+
`*-one-version-back` and `*-two-versions-back` are relative to the version of the same browser. For example, if `chrome` refers to version 79, then `chrome-one-version-back` will be Chrome 78 and `chrome-two-versions-back` will be Chrome 77.
|
|
676
|
+
|
|
677
|
+
### Getting a screenshot of multiple browsers in parallel
|
|
678
|
+
|
|
679
|
+
It's also possible to send an array of browsers, for example:
|
|
680
|
+
|
|
681
|
+
```js
|
|
682
|
+
cy.eyesOpen({
|
|
683
|
+
...
|
|
684
|
+
browser: [
|
|
685
|
+
{width: 800, height: 600, name: 'firefox'},
|
|
686
|
+
{width: 1024, height: 768, name: 'chrome'},
|
|
687
|
+
{width: 1024, height: 768, name: 'ie11'}
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
**Note**: If only a single browser is set, then Eyes-Cypress changes the Cypress application viewport to that viewport size.
|
|
693
|
+
|
|
694
|
+
### Device emulation
|
|
695
|
+
|
|
696
|
+
To enable chrome's device emulation, it's possible to send a device name and screen orientation, for example:
|
|
697
|
+
|
|
698
|
+
```js
|
|
699
|
+
cy.eyesOpen({
|
|
700
|
+
...
|
|
701
|
+
browser: {
|
|
702
|
+
deviceName: 'iPhone X',
|
|
703
|
+
screenOrientation: 'landscape',
|
|
704
|
+
name: 'chrome' // optional, just to make it explicit this is browser emulation and not a real device. Only chrome is supported for device emulation.
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
Possible values for screen orientation are `landscape` and `portrait`, and if no value is specified, the default is `portrait`.
|
|
710
|
+
|
|
711
|
+
The list of device names is available at https://github.com/applitools/eyes.sdk.javascript1/blob/master/packages/eyes-sdk-core/lib/config/DeviceName.js
|
|
712
|
+
|
|
713
|
+
In addition, it's possible to use chrome's device emulation with custom viewport sizes, pixel density and mobile mode, by passing `deviceScaleFactor` and `mobile` in addition to `width` and `height`. For example:
|
|
714
|
+
|
|
715
|
+
```js
|
|
716
|
+
cy.eyesOpen({
|
|
717
|
+
...
|
|
718
|
+
browser: {
|
|
719
|
+
width: 800,
|
|
720
|
+
height: 600,
|
|
721
|
+
deviceScaleFactor: 3,
|
|
722
|
+
mobile: true,
|
|
723
|
+
name: 'chrome' // optional, just to make it explicit this is browser emulation and not a real device. Only chrome is supported for device emulation.
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
### iOS device
|
|
729
|
+
|
|
730
|
+
```js
|
|
731
|
+
cy.eyesOpen({
|
|
732
|
+
// ...
|
|
733
|
+
browser: {
|
|
734
|
+
iosDeviceInfo: {
|
|
735
|
+
deviceName: 'iPhone XR',
|
|
736
|
+
screenOrientation: 'landscape', // optional, default: 'portrait'
|
|
737
|
+
iosVersion: 'latest' // optional, default: undefined (i.e. the default is determined by the Ultrafast grid)
|
|
738
|
+
},
|
|
739
|
+
}
|
|
740
|
+
})
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
The list of devices is available at https://github.com/applitools/eyes.sdk.javascript1/blob/master/packages/eyes-sdk-core/lib/config/IosDeviceName.js
|
|
744
|
+
|
|
745
|
+
Possible values for `iosVersion` are:
|
|
746
|
+
|
|
747
|
+
- `'latest'` - the latest iOS version that's supported by the UFG
|
|
748
|
+
- `'latest-1'` - one version prior to the latest version
|
|
749
|
+
- `undefined` - the UFG's default
|
|
750
|
+
|
|
751
|
+
## Intelligent Code Completion
|
|
752
|
+
|
|
753
|
+
#### There are two ways you can add Eyes-Cypress intelliSense to your tests:
|
|
754
|
+
|
|
755
|
+
### 1. Triple slash directives
|
|
756
|
+
|
|
757
|
+
The simplest way to see IntelliSense when typing an Eyes-Cypress command is to add a [triple-slash](http://www.typescriptlang.org/docs/handbook/triple-slash-directives.html) directive to the head of your JavaScript or TypeScript testing file. This will turn the IntelliSense on a per file basis:
|
|
758
|
+
```
|
|
759
|
+
/// <reference types="@applitools/eyes-cypress" />
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
### 2. Reference type declarations via `tsconfig`
|
|
763
|
+
|
|
764
|
+
Adding a [tsconfig.json](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) inside your cypress folder containing the following configuration should get intelligent code completion working on all your test files:
|
|
765
|
+
```
|
|
766
|
+
{
|
|
767
|
+
"compilerOptions": {
|
|
768
|
+
"allowJs": true,
|
|
769
|
+
"baseUrl": "../node_modules",
|
|
770
|
+
"types": [
|
|
771
|
+
"@applitools/eyes-cypress"
|
|
772
|
+
]
|
|
773
|
+
},
|
|
774
|
+
"include": [
|
|
775
|
+
"**/*.*"
|
|
776
|
+
]
|
|
777
|
+
}
|
|
778
|
+
```
|