@applitools/eyes 1.19.1 → 1.21.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 CHANGED
@@ -1,5 +1,382 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.21.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.20.1...js/eyes@1.21.0) (2024-06-26)
4
+
5
+
6
+ ### Features
7
+
8
+ * tell the backend if `remove duplicate tests` is used ([#2373](https://github.com/Applitools-Dev/sdk/issues/2373)) ([fe59b40](https://github.com/Applitools-Dev/sdk/commit/fe59b404ad163c595bb329d9a24ef2191d3bf170))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * @applitools/utils bumped to 1.7.4
19
+ #### Bug Fixes
20
+
21
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
22
+ * @applitools/logger bumped to 2.0.18
23
+ #### Bug Fixes
24
+
25
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
26
+
27
+
28
+
29
+ * @applitools/socket bumped to 1.1.18
30
+ #### Bug Fixes
31
+
32
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
33
+
34
+
35
+
36
+ * @applitools/req bumped to 1.7.2
37
+ #### Bug Fixes
38
+
39
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
40
+
41
+
42
+
43
+ * @applitools/image bumped to 1.1.13
44
+ #### Bug Fixes
45
+
46
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
47
+
48
+
49
+
50
+ * @applitools/snippets bumped to 2.4.27
51
+ #### Bug Fixes
52
+
53
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
54
+ * @applitools/css-tree bumped to 1.1.4
55
+ #### Bug Fixes
56
+
57
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
58
+ * @applitools/dom-shared bumped to 1.0.15
59
+ #### Bug Fixes
60
+
61
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
62
+ * @applitools/dom-capture bumped to 11.3.0
63
+ #### Features
64
+
65
+ * add cliet rects to text nodes ([#2188](https://github.com/Applitools-Dev/sdk/issues/2188)) ([0d4180e](https://github.com/Applitools-Dev/sdk/commit/0d4180e8e362669b36a27955121caae5575918f7))
66
+ * add cursor and pointer-events to dom-capture ([#2369](https://github.com/Applitools-Dev/sdk/issues/2369)) ([efdce02](https://github.com/Applitools-Dev/sdk/commit/efdce028a2a6fb18ad3c6237f2020c1ff00e90de))
67
+
68
+
69
+ #### Bug Fixes
70
+
71
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
72
+
73
+
74
+
75
+ * @applitools/dom-snapshot bumped to 4.11.3
76
+ #### Bug Fixes
77
+
78
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
79
+
80
+
81
+
82
+ * @applitools/spec-driver-webdriver bumped to 1.1.10
83
+ #### Bug Fixes
84
+
85
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
86
+
87
+
88
+
89
+ * @applitools/spec-driver-selenium bumped to 1.5.81
90
+ #### Bug Fixes
91
+
92
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
93
+
94
+
95
+
96
+ * @applitools/spec-driver-puppeteer bumped to 1.4.10
97
+ #### Bug Fixes
98
+
99
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
100
+
101
+
102
+
103
+ * @applitools/driver bumped to 1.17.5
104
+ #### Bug Fixes
105
+
106
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
107
+
108
+
109
+
110
+ * @applitools/screenshoter bumped to 3.8.34
111
+ #### Bug Fixes
112
+
113
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
114
+
115
+
116
+
117
+ * @applitools/nml-client bumped to 1.8.8
118
+ #### Bug Fixes
119
+
120
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
121
+
122
+
123
+
124
+ * @applitools/tunnel-client bumped to 1.5.7
125
+ #### Bug Fixes
126
+
127
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
128
+
129
+
130
+
131
+ * @applitools/ufg-client bumped to 1.12.2
132
+ #### Bug Fixes
133
+
134
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
135
+
136
+
137
+
138
+ * @applitools/ec-client bumped to 1.9.2
139
+ #### Bug Fixes
140
+
141
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
142
+
143
+
144
+
145
+ * @applitools/core-base bumped to 1.16.0
146
+ #### Features
147
+
148
+ * tell the backend if `remove duplicate tests` is used ([#2373](https://github.com/Applitools-Dev/sdk/issues/2373)) ([fe59b40](https://github.com/Applitools-Dev/sdk/commit/fe59b404ad163c595bb329d9a24ef2191d3bf170))
149
+
150
+
151
+ #### Bug Fixes
152
+
153
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
154
+
155
+
156
+
157
+ * @applitools/core bumped to 4.17.0
158
+ #### Features
159
+
160
+ * tell the backend if `remove duplicate tests` is used ([#2373](https://github.com/Applitools-Dev/sdk/issues/2373)) ([fe59b40](https://github.com/Applitools-Dev/sdk/commit/fe59b404ad163c595bb329d9a24ef2191d3bf170))
161
+
162
+
163
+ #### Bug Fixes
164
+
165
+ * change core ([d12a246](https://github.com/Applitools-Dev/sdk/commit/d12a246723cf72def6335e8698e711a43bda9e6a))
166
+ * tunnel client ([670b184](https://github.com/Applitools-Dev/sdk/commit/670b1843ce43347d97e19fa02f8bc630332ff414))
167
+
168
+
169
+
170
+
171
+ ## [1.20.1](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.20.0...js/eyes@1.20.1) (2024-05-28)
172
+
173
+
174
+ ### Bug Fixes
175
+
176
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
177
+
178
+
179
+ ### Dependencies
180
+
181
+ * @applitools/utils bumped to 1.7.3
182
+ #### Bug Fixes
183
+
184
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
185
+ * @applitools/logger bumped to 2.0.17
186
+ #### Bug Fixes
187
+
188
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
189
+
190
+
191
+
192
+ * @applitools/socket bumped to 1.1.17
193
+ #### Bug Fixes
194
+
195
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
196
+
197
+
198
+
199
+ * @applitools/req bumped to 1.7.1
200
+ #### Bug Fixes
201
+
202
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
203
+
204
+
205
+
206
+ * @applitools/image bumped to 1.1.12
207
+ #### Bug Fixes
208
+
209
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
210
+
211
+
212
+
213
+ * @applitools/snippets bumped to 2.4.26
214
+ #### Bug Fixes
215
+
216
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
217
+ * @applitools/css-tree bumped to 1.1.3
218
+ #### Bug Fixes
219
+
220
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
221
+ * @applitools/dom-shared bumped to 1.0.14
222
+ #### Bug Fixes
223
+
224
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
225
+ * @applitools/dom-capture bumped to 11.2.8
226
+ #### Bug Fixes
227
+
228
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
229
+
230
+
231
+
232
+ * @applitools/dom-snapshot bumped to 4.11.2
233
+ #### Bug Fixes
234
+
235
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
236
+
237
+
238
+
239
+ * @applitools/spec-driver-webdriver bumped to 1.1.8
240
+ #### Bug Fixes
241
+
242
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
243
+
244
+
245
+
246
+ * @applitools/spec-driver-selenium bumped to 1.5.79
247
+ #### Bug Fixes
248
+
249
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
250
+
251
+
252
+
253
+ * @applitools/spec-driver-puppeteer bumped to 1.4.8
254
+ #### Bug Fixes
255
+
256
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
257
+
258
+
259
+
260
+ * @applitools/driver bumped to 1.17.3
261
+ #### Bug Fixes
262
+
263
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
264
+
265
+
266
+
267
+ * @applitools/screenshoter bumped to 3.8.32
268
+ #### Bug Fixes
269
+
270
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
271
+
272
+
273
+
274
+ * @applitools/nml-client bumped to 1.8.6
275
+ #### Bug Fixes
276
+
277
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
278
+
279
+
280
+
281
+ * @applitools/tunnel-client bumped to 1.5.4
282
+ #### Bug Fixes
283
+
284
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
285
+
286
+
287
+
288
+ * @applitools/ufg-client bumped to 1.12.1
289
+ #### Bug Fixes
290
+
291
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
292
+
293
+
294
+
295
+ * @applitools/ec-client bumped to 1.8.7
296
+ #### Bug Fixes
297
+
298
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
299
+
300
+
301
+
302
+ * @applitools/core-base bumped to 1.15.1
303
+ #### Bug Fixes
304
+
305
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
306
+
307
+
308
+
309
+ * @applitools/core bumped to 4.16.1
310
+ #### Bug Fixes
311
+
312
+ * trigger release ([88c4f81](https://github.com/Applitools-Dev/sdk/commit/88c4f812bd92eae61ee8ebbee5da0d64ad8c8859))
313
+
314
+
315
+
316
+
317
+ ## [1.20.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.19.1...js/eyes@1.20.0) (2024-05-28)
318
+
319
+
320
+ ### Features
321
+
322
+ * tell Splunk when clients assume `Target`'s mutability ([#2266](https://github.com/Applitools-Dev/sdk/issues/2266)) ([d18a524](https://github.com/Applitools-Dev/sdk/commit/d18a52491fb6a64e780f84ccff1dcf945351bf95))
323
+
324
+
325
+ ### Dependencies
326
+
327
+ * @applitools/req bumped to 1.7.0
328
+ #### Features
329
+
330
+ * dynamic timeout based on uploaded file size ([#2364](https://github.com/Applitools-Dev/sdk/issues/2364)) ([8a82d68](https://github.com/Applitools-Dev/sdk/commit/8a82d6839ace60fda27e153ba233019f137017fe))
331
+ * @applitools/nml-client bumped to 1.8.5
332
+
333
+ * @applitools/tunnel-client bumped to 1.5.3
334
+
335
+ * @applitools/ufg-client bumped to 1.12.0
336
+ #### Features
337
+
338
+ * dynamic timeout based on uploaded file size ([#2364](https://github.com/Applitools-Dev/sdk/issues/2364)) ([8a82d68](https://github.com/Applitools-Dev/sdk/commit/8a82d6839ace60fda27e153ba233019f137017fe))
339
+
340
+
341
+
342
+ * @applitools/core-base bumped to 1.15.0
343
+ #### Features
344
+
345
+ * tell Splunk when clients assume `Target`'s mutability ([#2266](https://github.com/Applitools-Dev/sdk/issues/2266)) ([d18a524](https://github.com/Applitools-Dev/sdk/commit/d18a52491fb6a64e780f84ccff1dcf945351bf95))
346
+
347
+
348
+ #### Bug Fixes
349
+
350
+ * multiple heartbeats for multiple runners in the same process ([#2372](https://github.com/Applitools-Dev/sdk/issues/2372)) ([6ec0f0d](https://github.com/Applitools-Dev/sdk/commit/6ec0f0de7d69a69cdab8437df910a82df15479ea))
351
+
352
+
353
+
354
+ * @applitools/ec-client bumped to 1.8.6
355
+
356
+ * @applitools/core bumped to 4.16.0
357
+ #### Features
358
+
359
+ * tell Splunk when clients assume `Target`'s mutability ([#2266](https://github.com/Applitools-Dev/sdk/issues/2266)) ([d18a524](https://github.com/Applitools-Dev/sdk/commit/d18a52491fb6a64e780f84ccff1dcf945351bf95))
360
+
361
+
362
+ #### Bug Fixes
363
+
364
+ * multiple heartbeats for multiple runners in the same process ([#2372](https://github.com/Applitools-Dev/sdk/issues/2372)) ([6ec0f0d](https://github.com/Applitools-Dev/sdk/commit/6ec0f0de7d69a69cdab8437df910a82df15479ea))
365
+ * throw from createRenderResults if rendering failed ([#2352](https://github.com/Applitools-Dev/sdk/issues/2352)) ([50b0394](https://github.com/Applitools-Dev/sdk/commit/50b0394f35464f4d61dd578bf7e84947af00b99b))
366
+
367
+
368
+ #### Performance Improvements
369
+
370
+ * don't wait for ufg client when take-snapshots performed on non-… ([#2366](https://github.com/Applitools-Dev/sdk/issues/2366)) ([4d8ab41](https://github.com/Applitools-Dev/sdk/commit/4d8ab41a421ff9b7f6f7d107bc8c5e9647404430))
371
+
372
+
373
+ #### Code Refactoring
374
+
375
+ * remove eyesServerUrl and apiKey when not necessary ([#2345](https://github.com/Applitools-Dev/sdk/issues/2345)) ([121ae5d](https://github.com/Applitools-Dev/sdk/commit/121ae5d00417d70d9857b8199b4bcfd92de353c6))
376
+
377
+
378
+
379
+
3
380
  ## [1.19.1](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.19.0...js/eyes@1.19.1) (2024-05-07)
4
381
 
5
382
 
package/dist/Runners.js CHANGED
@@ -42,6 +42,7 @@ class EyesRunner {
42
42
  concurrency: options.testConcurrency,
43
43
  legacyConcurrency: options.legacyConcurrency,
44
44
  fetchConcurrency: options.fetchConcurrency,
45
+ removeDuplicateTests: options.removeDuplicateTests,
45
46
  };
46
47
  this._getResultsSettings = { removeDuplicateTests: options.removeDuplicateTests };
47
48
  }
@@ -28,9 +28,19 @@ const AccessibilityRegionType_1 = require("../enums/AccessibilityRegionType");
28
28
  const MatchLevel_1 = require("../enums/MatchLevel");
29
29
  const utils = __importStar(require("@applitools/utils"));
30
30
  class CheckSettingsBaseFluent {
31
- constructor(settings) {
31
+ constructor(settings, parent) {
32
+ var _a;
32
33
  this._settings = {};
34
+ this.childs = [];
33
35
  this._settings = utils.types.instanceOf(settings, CheckSettingsBaseFluent) ? settings.toObject() : settings !== null && settings !== void 0 ? settings : {};
36
+ this.parent = (parent !== null && parent !== void 0 ? parent : settings === null || settings === void 0 ? void 0 : settings.parent);
37
+ if (parent) {
38
+ (_a = parent.childs) !== null && _a !== void 0 ? _a : (parent.childs = []);
39
+ parent.childs.push(this);
40
+ }
41
+ else {
42
+ this._settings = utils.types.instanceOf(settings, CheckSettingsBaseFluent) ? settings.toObject() : settings !== null && settings !== void 0 ? settings : {};
43
+ }
34
44
  }
35
45
  region(region) {
36
46
  if (utils.types.has(region, ['left', 'top', 'width', 'height'])) {
@@ -241,12 +251,64 @@ class CheckSettingsBaseFluent {
241
251
  toString() {
242
252
  return utils.general.toString(this);
243
253
  }
254
+ /** @internal */
255
+ assumesMutability() {
256
+ // if this is a leaf of a linked list (i.e., has no children and all ancestors have exactly one child), them making the CheckSettings mutable is safe
257
+ if (this.childs.length)
258
+ return true;
259
+ for (let parent = this.parent; parent; parent = parent.parent) {
260
+ if (parent.childs.length !== 1)
261
+ return true;
262
+ }
263
+ return undefined;
264
+ }
265
+ static makeMutableTreeProxy(self, ctor) {
266
+ const shouldNotBeProxied = ['assumesMutability', 'childs', 'parent']; // these properties should not be proxied as they are used to determine if the tree is mutable
267
+ const shouldNotCreateChild = ['toObject', 'toJSON', 'toString']; // these properties should not create a child
268
+ return new Proxy(self, {
269
+ get(target, prop, receiver) {
270
+ if (shouldNotBeProxied.includes(String(prop)))
271
+ return Reflect.get(target, prop, receiver);
272
+ let rootTarget = target;
273
+ while (rootTarget.parent)
274
+ rootTarget = rootTarget.parent;
275
+ const origProp = Reflect.get(rootTarget, prop, receiver);
276
+ if (typeof origProp !== 'function')
277
+ return origProp;
278
+ if (shouldNotCreateChild.includes(String(prop)))
279
+ return origProp;
280
+ return function (...args) {
281
+ // @ts-ignore
282
+ const result = origProp.call(rootTarget, ...args);
283
+ if (result instanceof CheckSettingsBaseFluent) {
284
+ if (result instanceof CheckSettingsImageFluent || result instanceof CheckSettingsAutomationFluent) {
285
+ return new ctor(null, null, target);
286
+ }
287
+ else {
288
+ // should not happen - the only known types to be proxied are CheckSettingsImageFluent and CheckSettingsAutomationFluent
289
+ throw new Error('Unknown CheckSettings type');
290
+ }
291
+ }
292
+ return result;
293
+ };
294
+ },
295
+ });
296
+ }
244
297
  }
245
298
  exports.CheckSettingsBaseFluent = CheckSettingsBaseFluent;
246
299
  class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
247
- constructor(settings, target) {
248
- super(settings);
249
- this._target = target !== null && target !== void 0 ? target : settings === null || settings === void 0 ? void 0 : settings._target;
300
+ constructor(settings, target, parent) {
301
+ super(undefined, parent);
302
+ const self = CheckSettingsBaseFluent.makeMutableTreeProxy(this, CheckSettingsImageFluent);
303
+ this._target = null;
304
+ self._target = target !== null && target !== void 0 ? target : settings === null || settings === void 0 ? void 0 : settings._target;
305
+ self._settings = utils.types.instanceOf(settings, CheckSettingsImageFluent) ? settings.toObject() : settings !== null && settings !== void 0 ? settings : {};
306
+ if (settings instanceof CheckSettingsImageFluent) {
307
+ parent !== null && parent !== void 0 ? parent : (parent = settings.parent);
308
+ // copy constructor does not considered as a new child
309
+ parent === null || parent === void 0 ? void 0 : parent.childs.pop();
310
+ }
311
+ return self;
250
312
  }
251
313
  image(image) {
252
314
  var _a;
@@ -301,6 +363,7 @@ class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
301
363
  accessibilityRegions: (_f = this._settings.accessibilityRegions) === null || _f === void 0 ? void 0 : _f.slice(),
302
364
  pageId: this._settings.pageId,
303
365
  userCommandId: this._settings.variationGroupId,
366
+ assumesMutability: this.assumesMutability(),
304
367
  }),
305
368
  };
306
369
  }
@@ -327,12 +390,21 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
327
390
  _isFrameReference(value) {
328
391
  return utils.types.isNumber(value) || utils.types.isString(value) || this._isElementReference(value);
329
392
  }
330
- constructor(settings, spec) {
331
- super(settings);
332
- this._spec = spec;
333
- this._settings = utils.types.instanceOf(settings, CheckSettingsAutomationFluent)
393
+ constructor(settings, spec, parent) {
394
+ super(undefined, parent !== null && parent !== void 0 ? parent : settings === null || settings === void 0 ? void 0 : settings.parent);
395
+ this._settings = null;
396
+ this._spec = null;
397
+ const self = CheckSettingsBaseFluent.makeMutableTreeProxy(this, (CheckSettingsAutomationFluent));
398
+ self._spec = spec;
399
+ self._settings = utils.types.instanceOf(settings, CheckSettingsAutomationFluent)
334
400
  ? settings.toObject()
335
401
  : settings !== null && settings !== void 0 ? settings : {};
402
+ if (settings instanceof CheckSettingsAutomationFluent) {
403
+ parent !== null && parent !== void 0 ? parent : (parent = settings.parent);
404
+ // copy constructor does not considered as a new child
405
+ parent === null || parent === void 0 ? void 0 : parent.childs.pop();
406
+ }
407
+ return self;
336
408
  }
337
409
  region(region) {
338
410
  if (this._isSelectorReference(region) &&
@@ -514,6 +586,7 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
514
586
  retryTimeout: this._settings.timeout,
515
587
  userCommandId: this._settings.variationGroupId,
516
588
  densityMetrics: this._settings.densityMetrics,
589
+ assumesMutability: this.assumesMutability(),
517
590
  }),
518
591
  };
519
592
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes",
3
- "version": "1.19.1",
3
+ "version": "1.21.0",
4
4
  "keywords": [
5
5
  "applitools",
6
6
  "eyes",
@@ -45,12 +45,12 @@
45
45
  "test": "run --top-level mocha './test/**/*.spec.ts'"
46
46
  },
47
47
  "dependencies": {
48
- "@applitools/core": "4.15.0",
49
- "@applitools/logger": "2.0.16",
50
- "@applitools/utils": "1.7.2"
48
+ "@applitools/core": "4.17.0",
49
+ "@applitools/logger": "2.0.18",
50
+ "@applitools/utils": "1.7.4"
51
51
  },
52
52
  "devDependencies": {
53
- "@applitools/req": "^1.6.7",
53
+ "@applitools/req": "^1.7.2",
54
54
  "@types/node": "^12.20.55"
55
55
  },
56
56
  "engines": {
@@ -92,22 +92,24 @@ export type CheckSettingsAutomation<TSpec extends Core.SpecType> = CheckSettings
92
92
  };
93
93
  export declare class CheckSettingsBaseFluent<TRegion = never> {
94
94
  protected _settings: CheckSettingsBase<TRegion>;
95
- constructor(settings?: CheckSettingsBase<TRegion> | CheckSettingsBaseFluent<TRegion>);
96
- region(region: Region | LegacyRegion | TRegion): this;
97
- name(name: string): this;
95
+ protected parent?: this;
96
+ protected childs: this[];
97
+ constructor(settings?: CheckSettingsBase<TRegion> | CheckSettingsBaseFluent<TRegion>, parent?: CheckSettingsBaseFluent<TRegion>);
98
+ region(region: Region | LegacyRegion | TRegion): typeof this;
99
+ name(name: string): typeof this;
98
100
  withName(name: string): this;
99
- ignoreRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
100
- ignoreRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
101
+ ignoreRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
102
+ ignoreRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
101
103
  /** @deprecated */
102
104
  ignore(region: Region | LegacyRegion | TRegion): this;
103
105
  /** @deprecated */
104
- ignores(...regions: (Region | LegacyRegion | TRegion)[]): this;
105
- layoutRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
106
- layoutRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
107
- strictRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
108
- strictRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
109
- contentRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
110
- contentRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
106
+ ignores(...regions: (Region | LegacyRegion | TRegion)[]): typeof this;
107
+ layoutRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
108
+ layoutRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
109
+ strictRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
110
+ strictRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
111
+ contentRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
112
+ contentRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
111
113
  floatingRegion(region: CodedFloatingRegion<TRegion>): this;
112
114
  floatingRegion(region: LegacyCodedFloatingRegion<TRegion>): this;
113
115
  floatingRegion(region: Region | LegacyRegion | TRegion, maxUpOffset?: number, maxDownOffset?: number, maxLeftOffset?: number, maxRightOffset?: number): this;
@@ -125,36 +127,39 @@ export declare class CheckSettingsBaseFluent<TRegion = never> {
125
127
  accessibilityRegion(region: Region | LegacyRegion | TRegion, type?: AccessibilityRegionType): this;
126
128
  accessibilityRegions(...regions: (CodedAccessibilityRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
127
129
  accessibilityRegions(type: AccessibilityRegionType, ...regions: (Region | LegacyRegion | TRegion)[]): this;
128
- matchLevel(matchLevel: MatchLevel): this;
129
- layout(): this;
130
- exact(): this;
131
- strict(): this;
132
- ignoreColors(): this;
130
+ matchLevel(matchLevel: MatchLevel): typeof this;
131
+ layout(): typeof this;
132
+ exact(): typeof this;
133
+ strict(): typeof this;
134
+ ignoreColors(): typeof this;
133
135
  /** @deprecated */
134
- content(): this;
135
- enablePatterns(enablePatterns?: boolean): this;
136
- ignoreDisplacements(ignoreDisplacements?: boolean): this;
137
- ignoreCaret(ignoreCaret?: boolean): this;
138
- useDom(useDom?: boolean): this;
139
- sendDom(sendDom?: boolean): this;
140
- pageId(pageId: string): this;
141
- variationGroupId(variationGroupId: string): this;
136
+ content(): typeof this;
137
+ enablePatterns(enablePatterns?: boolean): typeof this;
138
+ ignoreDisplacements(ignoreDisplacements?: boolean): typeof this;
139
+ ignoreCaret(ignoreCaret?: boolean): typeof this;
140
+ useDom(useDom?: boolean): typeof this;
141
+ sendDom(sendDom?: boolean): typeof this;
142
+ pageId(pageId: string): typeof this;
143
+ variationGroupId(variationGroupId: string): typeof this;
142
144
  /** @internal */
143
145
  toObject(): CheckSettingsBase<TRegion>;
144
146
  /** @internal */
145
147
  toString(): string;
148
+ /** @internal */
149
+ protected assumesMutability(): true | undefined;
150
+ protected static makeMutableTreeProxy<K, T extends CheckSettingsBaseFluent<K>>(self: T, ctor: new (...args: any[]) => T): T;
146
151
  }
147
152
  export declare class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
148
153
  protected _target: Image;
149
- constructor(settings?: CheckSettingsImage | CheckSettingsImageFluent, target?: Image);
150
- image(image: Buffer | URL | string): this;
151
- buffer(imageBuffer: Buffer): this;
152
- base64(imageBase64: Buffer): this;
153
- path(imagePath: string): this;
154
- url(imageUrl: URL | string): this;
155
- name(name: string): this;
156
- withDom(dom: string): this;
157
- withLocation(locationInViewport: Location): this;
154
+ constructor(settings?: CheckSettingsImage | CheckSettingsImageFluent, target?: Image, parent?: CheckSettingsImageFluent);
155
+ image(image: Buffer | URL | string): typeof this;
156
+ buffer(imageBuffer: Buffer): typeof this;
157
+ base64(imageBase64: Buffer): typeof this;
158
+ path(imagePath: string): typeof this;
159
+ url(imageUrl: URL | string): typeof this;
160
+ name(name: string): typeof this;
161
+ withDom(dom: string): typeof this;
162
+ withLocation(locationInViewport: Location): typeof this;
158
163
  /** @internal */
159
164
  toJSON(): {
160
165
  target: Image;
@@ -170,24 +175,24 @@ export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType =
170
175
  protected _isFrameReference(value: any): value is FrameReference<TSpec>;
171
176
  constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>);
172
177
  /** @internal */
173
- constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>, spec?: Core.SpecDriver<TSpec>);
178
+ constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>, spec?: Core.SpecDriver<TSpec>, parent?: CheckSettingsAutomationFluent<TSpec>);
174
179
  region(region: RegionReference<TSpec>): this;
175
- shadow(selector: SelectorReference<TSpec>): this;
180
+ shadow(selector: SelectorReference<TSpec>): typeof this;
176
181
  frame(context: ContextReference<TSpec>): this;
177
182
  frame(frame: FrameReference<TSpec>, scrollRootElement?: ElementReference<TSpec>): this;
178
- webview(webview?: string | boolean): this;
179
- scrollRootElement(scrollRootElement: ElementReference<TSpec>): this;
180
- fully(fully?: boolean): this;
183
+ webview(webview?: string | boolean): typeof this;
184
+ scrollRootElement(scrollRootElement: ElementReference<TSpec>): typeof this;
185
+ fully(fully?: boolean): typeof this;
181
186
  /** @deprecated */
182
187
  stitchContent(stitchContent?: boolean): this;
183
- disableBrowserFetching(disableBrowserFetching: boolean): this;
188
+ disableBrowserFetching(disableBrowserFetching: boolean): typeof this;
184
189
  layoutBreakpoints(breakpoints?: boolean | number[], settings?: {
185
190
  reload?: boolean;
186
- }): this;
187
- hook(name: string, script: string): this;
188
- beforeRenderScreenshotHook(script: string): this;
191
+ }): typeof this;
192
+ hook(name: string, script: string): typeof this;
193
+ beforeRenderScreenshotHook(script: string): typeof this;
189
194
  /** @deprecated */
190
- webHook(script: string): this;
195
+ webHook(script: string): typeof this;
191
196
  ufgOption(key: string, value: any): this;
192
197
  ufgOptions(options: {
193
198
  [key: string]: any;
@@ -205,10 +210,10 @@ export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType =
205
210
  [key: string]: any;
206
211
  }): this;
207
212
  useSystemScreenshot(useSystemScreenshot?: boolean): this;
208
- timeout(timeout: number): this;
209
- waitBeforeCapture(waitBeforeCapture: number): this;
210
- lazyLoad(options?: LazyLoadOptions | boolean): this;
211
- densityMetrics(options: DensityMetrics): this;
213
+ timeout(timeout: number): typeof this;
214
+ waitBeforeCapture(waitBeforeCapture: number): typeof this;
215
+ lazyLoad(options?: LazyLoadOptions | boolean): typeof this;
216
+ densityMetrics(options: DensityMetrics): typeof this;
212
217
  /** @internal */
213
218
  toJSON(): {
214
219
  target: undefined;