@applitools/eyes 1.7.2 → 1.8.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,199 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.8.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes@1.7.3...js/eyes@1.8.0) (2023-08-30)
4
+
5
+
6
+ ### Features
7
+
8
+ * added more iOS devices ([a84311f](https://github.com/applitools/eyes.sdk.javascript1/commit/a84311f88e6f532268543a96f841ae5ad87d5659))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/utils bumped to 1.5.2
14
+ #### Bug Fixes
15
+
16
+ * fixed some types ([498b1d7](https://github.com/applitools/eyes.sdk.javascript1/commit/498b1d7c547df04773b64b66ee39cccb402c093e))
17
+ * @applitools/logger bumped to 2.0.9
18
+
19
+ * @applitools/socket bumped to 1.1.9
20
+
21
+ * @applitools/req bumped to 1.5.4
22
+
23
+ * @applitools/image bumped to 1.1.4
24
+
25
+ * @applitools/spec-driver-webdriver bumped to 1.0.43
26
+
27
+ * @applitools/spec-driver-selenium bumped to 1.5.57
28
+
29
+ * @applitools/spec-driver-puppeteer bumped to 1.1.74
30
+
31
+ * @applitools/driver bumped to 1.13.6
32
+
33
+ * @applitools/screenshoter bumped to 3.8.9
34
+
35
+ * @applitools/nml-client bumped to 1.5.9
36
+ #### Bug Fixes
37
+
38
+ * update broker url when server respond with error ([#1882](https://github.com/applitools/eyes.sdk.javascript1/issues/1882)) ([ab5a6ae](https://github.com/applitools/eyes.sdk.javascript1/commit/ab5a6ae8976b061bda8b56a9cc11c149e47d6dea))
39
+
40
+
41
+
42
+ * @applitools/tunnel-client bumped to 1.2.1
43
+
44
+ * @applitools/ufg-client bumped to 1.7.2
45
+
46
+ * @applitools/ec-client bumped to 1.7.6
47
+
48
+ * @applitools/core-base bumped to 1.5.2
49
+
50
+ * @applitools/core bumped to 3.10.0
51
+ #### Features
52
+
53
+ * allowed running multiple classic test with different devices for applitoolsified native apps ([#1891](https://github.com/applitools/eyes.sdk.javascript1/issues/1891)) ([a84311f](https://github.com/applitools/eyes.sdk.javascript1/commit/a84311f88e6f532268543a96f841ae5ad87d5659))
54
+
55
+
56
+
57
+
58
+ ## [1.7.3](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes@1.7.2...js/eyes@1.7.3) (2023-08-18)
59
+
60
+
61
+ ### Code Refactoring
62
+
63
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
64
+
65
+
66
+ ### Dependencies
67
+
68
+ * @applitools/utils bumped to 1.5.1
69
+ #### Code Refactoring
70
+
71
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
72
+ * @applitools/logger bumped to 2.0.8
73
+ #### Code Refactoring
74
+
75
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
76
+
77
+
78
+
79
+ * @applitools/socket bumped to 1.1.8
80
+ #### Code Refactoring
81
+
82
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
83
+
84
+
85
+
86
+ * @applitools/req bumped to 1.5.3
87
+ #### Code Refactoring
88
+
89
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
90
+
91
+
92
+
93
+ * @applitools/image bumped to 1.1.3
94
+ #### Code Refactoring
95
+
96
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
97
+
98
+
99
+
100
+ * @applitools/snippets bumped to 2.4.23
101
+ #### Code Refactoring
102
+
103
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
104
+ * @applitools/spec-driver-webdriver bumped to 1.0.42
105
+ #### Code Refactoring
106
+
107
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
108
+
109
+
110
+
111
+ * @applitools/spec-driver-selenium bumped to 1.5.56
112
+ #### Code Refactoring
113
+
114
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
115
+
116
+
117
+
118
+ * @applitools/spec-driver-puppeteer bumped to 1.1.73
119
+ #### Code Refactoring
120
+
121
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
122
+
123
+
124
+
125
+ * @applitools/driver bumped to 1.13.5
126
+ #### Bug Fixes
127
+
128
+ * optimize driver usage in close ([#1867](https://github.com/applitools/eyes.sdk.javascript1/issues/1867)) ([60dff6b](https://github.com/applitools/eyes.sdk.javascript1/commit/60dff6b160e69d3893c91a1125d668fa18b43072))
129
+
130
+
131
+ #### Code Refactoring
132
+
133
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
134
+
135
+
136
+
137
+ * @applitools/screenshoter bumped to 3.8.8
138
+ #### Code Refactoring
139
+
140
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
141
+
142
+
143
+
144
+ * @applitools/nml-client bumped to 1.5.8
145
+ #### Code Refactoring
146
+
147
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
148
+
149
+
150
+
151
+ * @applitools/tunnel-client bumped to 1.2.0
152
+ #### Features
153
+
154
+ * replace and destroy tunnels by tunnel id ([#1878](https://github.com/applitools/eyes.sdk.javascript1/issues/1878)) ([22bcc15](https://github.com/applitools/eyes.sdk.javascript1/commit/22bcc15b31457e3da56cdb6f73bee3dcb7e051a1))
155
+
156
+
157
+ #### Code Refactoring
158
+
159
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
160
+
161
+
162
+
163
+ * @applitools/ufg-client bumped to 1.7.1
164
+ #### Code Refactoring
165
+
166
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
167
+
168
+
169
+
170
+ * @applitools/ec-client bumped to 1.7.5
171
+ #### Code Refactoring
172
+
173
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
174
+
175
+
176
+
177
+ * @applitools/core-base bumped to 1.5.1
178
+ #### Code Refactoring
179
+
180
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
181
+
182
+
183
+
184
+ * @applitools/core bumped to 3.9.1
185
+ #### Bug Fixes
186
+
187
+ * optimize driver usage in close ([#1867](https://github.com/applitools/eyes.sdk.javascript1/issues/1867)) ([60dff6b](https://github.com/applitools/eyes.sdk.javascript1/commit/60dff6b160e69d3893c91a1125d668fa18b43072))
188
+
189
+
190
+ #### Code Refactoring
191
+
192
+ * refactored spec driver interface ([#1839](https://github.com/applitools/eyes.sdk.javascript1/issues/1839)) ([aa49ec2](https://github.com/applitools/eyes.sdk.javascript1/commit/aa49ec2a7d14b8529acc3a8a4c2baecfa113d98a))
193
+
194
+
195
+
196
+
3
197
  ## [1.7.2](https://github.com/applitools/eyes.sdk.javascript1/compare/js/eyes@1.7.1...js/eyes@1.7.2) (2023-08-10)
4
198
 
5
199
 
package/dist/Eyes.js CHANGED
@@ -167,9 +167,9 @@ class Eyes {
167
167
  return this.constructor.setMobileCapabilities(capabilities, this._config);
168
168
  }
169
169
  async open(driverOrConfigOrAppName, configOrAppNameOrTestName, testNameOrViewportSize, viewportSizeOrSessionType, sessionType) {
170
- var _a, _b, _c, _d;
171
- var _e;
172
- if ((_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.isDriver) === null || _b === void 0 ? void 0 : _b.call(_a, driverOrConfigOrAppName)) {
170
+ var _a, _b, _c, _d, _e, _f;
171
+ var _g;
172
+ if (((_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.isDriver) === null || _b === void 0 ? void 0 : _b.call(_a, driverOrConfigOrAppName)) || ((_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.isSecondaryDriver) === null || _d === void 0 ? void 0 : _d.call(_c, driverOrConfigOrAppName))) {
173
173
  this._driver = driverOrConfigOrAppName;
174
174
  }
175
175
  else {
@@ -201,13 +201,13 @@ class Eyes {
201
201
  if (utils.types.isString(testNameOrViewportSize))
202
202
  config.open.testName = testNameOrViewportSize;
203
203
  if (utils.types.has(viewportSizeOrSessionType, ['width', 'height'])) {
204
- (_c = (_e = config.open).environment) !== null && _c !== void 0 ? _c : (_e.environment = {});
204
+ (_e = (_g = config.open).environment) !== null && _e !== void 0 ? _e : (_g.environment = {});
205
205
  config.open.environment.viewportSize = viewportSizeOrSessionType;
206
206
  }
207
207
  if (utils.types.isEnumValue(sessionType, SessionType_1.SessionTypeEnum))
208
208
  config.open.sessionType = sessionType;
209
+ this._state.appName = (_f = config.open) === null || _f === void 0 ? void 0 : _f.appName;
209
210
  config.open.keepPlatformNameAsIs = true;
210
- this._state.appName = (_d = config.open) === null || _d === void 0 ? void 0 : _d.appName;
211
211
  this._eyes = await this._runner.openEyes({
212
212
  target: this._driver,
213
213
  config,
@@ -263,8 +263,8 @@ class Eyes {
263
263
  type = 'classic';
264
264
  settings.screenshotMode = 'default';
265
265
  }
266
- const [result] = await this._eyes.check({ type, target, settings, config });
267
- return new MatchResult_1.MatchResultData(result);
266
+ await this._eyes.check({ type, target, settings, config });
267
+ return new MatchResult_1.MatchResultData({});
268
268
  }
269
269
  /** @deprecated */
270
270
  async checkWindow(name, timeout, fully = false) {
@@ -3,29 +3,65 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IosDeviceNameEnum = void 0;
4
4
  var IosDeviceNameEnum;
5
5
  (function (IosDeviceNameEnum) {
6
- IosDeviceNameEnum["iPhone_14_Pro_Max"] = "iPhone 14 Pro Max";
7
- IosDeviceNameEnum["iPhone_14"] = "iPhone 14";
8
- IosDeviceNameEnum["iPhone_13_Pro_Max"] = "iPhone 13 Pro Max";
9
- IosDeviceNameEnum["iPhone_13_Pro"] = "iPhone 13 Pro";
10
- IosDeviceNameEnum["iPhone_13"] = "iPhone 13";
11
- IosDeviceNameEnum["iPhone_12_Pro_Max"] = "iPhone 12 Pro Max";
12
- IosDeviceNameEnum["iPhone_12_Pro"] = "iPhone 12 Pro";
13
- IosDeviceNameEnum["iPhone_12"] = "iPhone 12";
14
- IosDeviceNameEnum["iPhone_12_mini"] = "iPhone 12 mini";
15
- IosDeviceNameEnum["iPhone_11_Pro"] = "iPhone 11 Pro";
16
- IosDeviceNameEnum["iPhone_11_Pro_Max"] = "iPhone 11 Pro Max";
17
- IosDeviceNameEnum["iPhone_11"] = "iPhone 11";
18
- IosDeviceNameEnum["iPhone_XR"] = "iPhone XR";
19
- IosDeviceNameEnum["iPhone_XS"] = "iPhone Xs";
20
- IosDeviceNameEnum["iPhone_X"] = "iPhone X";
6
+ IosDeviceNameEnum["iPhone_6s"] = "iPhone 6s";
7
+ IosDeviceNameEnum["iPhone_6s_Plus"] = "iPhone 6s Plus";
8
+ IosDeviceNameEnum["iPhone_7"] = "iPhone 7";
9
+ IosDeviceNameEnum["iPhone_7_Plus"] = "iPhone 7 Plus";
21
10
  IosDeviceNameEnum["iPhone_8"] = "iPhone 8";
22
11
  IosDeviceNameEnum["iPhone_8_Plus"] = "iPhone 8 Plus";
23
- IosDeviceNameEnum["iPhone_7"] = "iPhone 7";
12
+ IosDeviceNameEnum["iPhone_X"] = "iPhone X";
13
+ IosDeviceNameEnum["iPhone_XR"] = "iPhone XR";
14
+ IosDeviceNameEnum["iPhone_Xs"] = "iPhone Xs";
15
+ /** @deprecated use {@link iPhone_Xs} instead */
16
+ IosDeviceNameEnum["iPhone_XS"] = "iPhone Xs";
17
+ IosDeviceNameEnum["iPhone_Xs_Max"] = "iPhone Xs Max";
18
+ IosDeviceNameEnum["iPhone_11"] = "iPhone 11";
19
+ IosDeviceNameEnum["iPhone_11_Pro"] = "iPhone 11 Pro";
20
+ IosDeviceNameEnum["iPhone_11_Pro_Max"] = "iPhone 11 Pro Max";
21
+ IosDeviceNameEnum["iPhone_12"] = "iPhone 12";
22
+ IosDeviceNameEnum["iPhone_12_mini"] = "iPhone 12 mini";
23
+ IosDeviceNameEnum["iPhone_12_Pro"] = "iPhone 12 Pro";
24
+ IosDeviceNameEnum["iPhone_12_Pro_Max"] = "iPhone 12 Pro Max";
25
+ IosDeviceNameEnum["iPhone_13"] = "iPhone 13";
26
+ IosDeviceNameEnum["iPhone_13_mini"] = "iPhone 13 mini";
27
+ IosDeviceNameEnum["iPhone_13_Pro"] = "iPhone 13 Pro";
28
+ IosDeviceNameEnum["iPhone_13_Pro_Max"] = "iPhone 13 Pro Max";
29
+ IosDeviceNameEnum["iPhone_14"] = "iPhone 14";
30
+ IosDeviceNameEnum["iPhone_14_Plus"] = "iPhone 14 Plus";
31
+ IosDeviceNameEnum["iPhone_14_Pro"] = "iPhone 14 Pro";
32
+ IosDeviceNameEnum["iPhone_14_Pro_Max"] = "iPhone 14 Pro Max";
24
33
  IosDeviceNameEnum["iPhone_SE"] = "iPhone SE (1st generation)";
25
- IosDeviceNameEnum["iPad_Pro_3"] = "iPad Pro (12.9-inch) (3rd generation)";
26
- IosDeviceNameEnum["iPad_Pro_4"] = "iPad Pro (11-inch) (4th generation)";
34
+ IosDeviceNameEnum["iPhone_SE_1"] = "iPhone SE (1st generation)";
35
+ IosDeviceNameEnum["iPhone_SE_2"] = "iPhone SE (2nd generation)";
36
+ IosDeviceNameEnum["iPhone_SE_3"] = "iPhone SE (3rd generation)";
37
+ IosDeviceNameEnum["iPad_5"] = "iPad (5th generation)";
38
+ IosDeviceNameEnum["iPad_6"] = "iPad (6th generation)";
27
39
  IosDeviceNameEnum["iPad_7"] = "iPad (7th generation)";
40
+ IosDeviceNameEnum["iPad_8"] = "iPad (8th generation)";
28
41
  IosDeviceNameEnum["iPad_9"] = "iPad (9th generation)";
29
- IosDeviceNameEnum["iPad_Air_2"] = "iPad Air (2nd generation)";
42
+ IosDeviceNameEnum["iPad_10"] = "iPad (10th generation)";
43
+ IosDeviceNameEnum["iPad_Air_2"] = "iPad Air 2";
44
+ IosDeviceNameEnum["iPad_Air_3"] = "iPad Air (3rd generation)";
30
45
  IosDeviceNameEnum["iPad_Air_4"] = "iPad Air (4th generation)";
46
+ IosDeviceNameEnum["iPad_Air_5"] = "iPad Air (5th generation)";
47
+ IosDeviceNameEnum["iPad_mini_4"] = "iPad mini 4";
48
+ IosDeviceNameEnum["iPad_mini_5"] = "iPad mini (5th generation)";
49
+ IosDeviceNameEnum["iPad_mini_6"] = "iPad mini (6th generation)";
50
+ IosDeviceNameEnum["iPad_Pro_9_7_inch_1"] = "iPad Pro (9.7-inch)";
51
+ IosDeviceNameEnum["iPad_Pro_10_5_inch_1"] = "iPad Pro (10.5-inch)";
52
+ IosDeviceNameEnum["iPad_Pro_11_inch_1"] = "iPad Pro (11-inch) (1st generation)";
53
+ IosDeviceNameEnum["iPad_Pro_12_9_inch_1"] = "iPad Pro (12.9-inch) (1st generation)";
54
+ IosDeviceNameEnum["iPad_Pro_11_inch_2"] = "iPad Pro (11-inch) (2nd generation)";
55
+ IosDeviceNameEnum["iPad_Pro_12_9_inch_2"] = "iPad Pro (12.9-inch) (2nd generation)";
56
+ IosDeviceNameEnum["iPad_Pro_11_inch_3"] = "iPad Pro (11-inch) (3rd generation)";
57
+ IosDeviceNameEnum["iPad_Pro_12_9_inch_3"] = "iPad Pro (12.9-inch) (3rd generation)";
58
+ /** @deprecated use {@link iPad_Pro_12_9_inch_3} instead */
59
+ IosDeviceNameEnum["iPad_Pro_3"] = "iPad Pro (12.9-inch) (3rd generation)";
60
+ IosDeviceNameEnum["iPad_Pro_11_inch_4"] = "iPad Pro (11-inch) (4th generation)";
61
+ /** @deprecated use {@link iPad_Pro_11_inch_4} instead */
62
+ IosDeviceNameEnum["iPad_Pro_4"] = "iPad Pro (11-inch) (4th generation)";
63
+ IosDeviceNameEnum["iPad_Pro_12_9_inch_4"] = "iPad Pro (12.9-inch) (4th generation)";
64
+ IosDeviceNameEnum["iPad_Pro_12_9_inch_5"] = "iPad Pro (12.9-inch) (5th generation)";
65
+ IosDeviceNameEnum["iPad_Pro_12_9_inch_6"] = "iPad Pro (12.9-inch) (6th generation)";
66
+ IosDeviceNameEnum["iPod_touch_7"] = "iPod touch (7th generation)";
31
67
  })(IosDeviceNameEnum || (exports.IosDeviceNameEnum = IosDeviceNameEnum = {}));
@@ -307,27 +307,31 @@ class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
307
307
  exports.CheckSettingsImageFluent = CheckSettingsImageFluent;
308
308
  class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
309
309
  _isElementReference(value) {
310
- var _a, _b;
310
+ var _a, _b, _c;
311
311
  const spec = (_a = this._spec) !== null && _a !== void 0 ? _a : this.constructor._spec;
312
- return !!((_b = spec.isElement) === null || _b === void 0 ? void 0 : _b.call(spec, value)) || this._isSelectorReference(value);
312
+ return !!((_b = spec.isElement) === null || _b === void 0 ? void 0 : _b.call(spec, value)) || !!((_c = spec.isSecondaryElement) === null || _c === void 0 ? void 0 : _c.call(spec, value)) || this._isSelectorReference(value);
313
313
  }
314
314
  _isSelectorReference(selector) {
315
- var _a, _b, _c;
315
+ var _a, _b, _c, _d, _e;
316
316
  const spec = (_a = this._spec) !== null && _a !== void 0 ? _a : this.constructor._spec;
317
317
  return (!!((_b = spec.isSelector) === null || _b === void 0 ? void 0 : _b.call(spec, selector)) ||
318
+ !!((_c = spec.isSecondarySelector) === null || _c === void 0 ? void 0 : _c.call(spec, selector)) ||
318
319
  utils.types.isString(selector) ||
319
320
  (utils.types.isPlainObject(selector) &&
320
321
  utils.types.has(selector, 'selector') &&
321
- (utils.types.isString(selector.selector) || !!((_c = spec.isSelector) === null || _c === void 0 ? void 0 : _c.call(spec, selector.selector)))));
322
+ (utils.types.isString(selector.selector) ||
323
+ !!((_d = spec.isSelector) === null || _d === void 0 ? void 0 : _d.call(spec, selector.selector)) ||
324
+ !!((_e = spec.isSecondarySelector) === null || _e === void 0 ? void 0 : _e.call(spec, selector)))));
322
325
  }
323
326
  _isFrameReference(value) {
324
327
  return utils.types.isNumber(value) || utils.types.isString(value) || this._isElementReference(value);
325
328
  }
326
329
  constructor(settings, spec) {
327
- var _a;
328
330
  super(settings);
329
331
  this._spec = spec;
330
- (_a = this._settings) !== null && _a !== void 0 ? _a : (this._settings = {});
332
+ this._settings = utils.types.instanceOf(settings, CheckSettingsAutomationFluent)
333
+ ? settings.toObject()
334
+ : settings !== null && settings !== void 0 ? settings : {};
331
335
  }
332
336
  region(region) {
333
337
  if (this._isSelectorReference(region) &&
@@ -37,18 +37,21 @@ const ImageMatchSettings_1 = require("./ImageMatchSettings");
37
37
  const utils = __importStar(require("@applitools/utils"));
38
38
  class ConfigurationData {
39
39
  _isElementReference(value) {
40
- var _a, _b;
40
+ var _a, _b, _c;
41
41
  const spec = (_a = this._spec) !== null && _a !== void 0 ? _a : this.constructor._spec;
42
- return !!((_b = spec.isElement) === null || _b === void 0 ? void 0 : _b.call(spec, value)) || this._isSelectorReference(value);
42
+ return !!((_b = spec.isElement) === null || _b === void 0 ? void 0 : _b.call(spec, value)) || !!((_c = spec.isSecondaryElement) === null || _c === void 0 ? void 0 : _c.call(spec, value)) || this._isSelectorReference(value);
43
43
  }
44
44
  _isSelectorReference(selector) {
45
- var _a, _b, _c;
45
+ var _a, _b, _c, _d, _e;
46
46
  const spec = (_a = this._spec) !== null && _a !== void 0 ? _a : this.constructor._spec;
47
47
  return (!!((_b = spec.isSelector) === null || _b === void 0 ? void 0 : _b.call(spec, selector)) ||
48
+ !!((_c = spec.isSecondarySelector) === null || _c === void 0 ? void 0 : _c.call(spec, selector)) ||
48
49
  utils.types.isString(selector) ||
49
50
  (utils.types.isPlainObject(selector) &&
50
51
  utils.types.has(selector, 'selector') &&
51
- (utils.types.isString(selector.selector) || !!((_c = spec.isSelector) === null || _c === void 0 ? void 0 : _c.call(spec, selector.selector)))));
52
+ (utils.types.isString(selector.selector) ||
53
+ !!((_d = spec.isSelector) === null || _d === void 0 ? void 0 : _d.call(spec, selector.selector)) ||
54
+ !!((_e = spec.isSecondarySelector) === null || _e === void 0 ? void 0 : _e.call(spec, selector.selector)))));
52
55
  }
53
56
  constructor(config, spec) {
54
57
  this._config = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes",
3
- "version": "1.7.2",
3
+ "version": "1.8.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": "3.9.0",
49
- "@applitools/logger": "2.0.7",
50
- "@applitools/utils": "1.5.0"
48
+ "@applitools/core": "3.10.0",
49
+ "@applitools/logger": "2.0.9",
50
+ "@applitools/utils": "1.5.2"
51
51
  },
52
52
  "devDependencies": {
53
- "@applitools/req": "^1.5.2",
53
+ "@applitools/req": "^1.5.4",
54
54
  "@types/node": "^12.20.55"
55
55
  },
56
56
  "engines": {
@@ -1,28 +1,64 @@
1
1
  export declare enum IosDeviceNameEnum {
2
- iPhone_14_Pro_Max = "iPhone 14 Pro Max",
3
- iPhone_14 = "iPhone 14",
4
- iPhone_13_Pro_Max = "iPhone 13 Pro Max",
5
- iPhone_13_Pro = "iPhone 13 Pro",
6
- iPhone_13 = "iPhone 13",
7
- iPhone_12_Pro_Max = "iPhone 12 Pro Max",
8
- iPhone_12_Pro = "iPhone 12 Pro",
9
- iPhone_12 = "iPhone 12",
10
- iPhone_12_mini = "iPhone 12 mini",
11
- iPhone_11_Pro = "iPhone 11 Pro",
12
- iPhone_11_Pro_Max = "iPhone 11 Pro Max",
13
- iPhone_11 = "iPhone 11",
14
- iPhone_XR = "iPhone XR",
15
- iPhone_XS = "iPhone Xs",
16
- iPhone_X = "iPhone X",
2
+ iPhone_6s = "iPhone 6s",
3
+ iPhone_6s_Plus = "iPhone 6s Plus",
4
+ iPhone_7 = "iPhone 7",
5
+ iPhone_7_Plus = "iPhone 7 Plus",
17
6
  iPhone_8 = "iPhone 8",
18
7
  iPhone_8_Plus = "iPhone 8 Plus",
19
- iPhone_7 = "iPhone 7",
8
+ iPhone_X = "iPhone X",
9
+ iPhone_XR = "iPhone XR",
10
+ iPhone_Xs = "iPhone Xs",
11
+ /** @deprecated use {@link iPhone_Xs} instead */
12
+ iPhone_XS = "iPhone Xs",
13
+ iPhone_Xs_Max = "iPhone Xs Max",
14
+ iPhone_11 = "iPhone 11",
15
+ iPhone_11_Pro = "iPhone 11 Pro",
16
+ iPhone_11_Pro_Max = "iPhone 11 Pro Max",
17
+ iPhone_12 = "iPhone 12",
18
+ iPhone_12_mini = "iPhone 12 mini",
19
+ iPhone_12_Pro = "iPhone 12 Pro",
20
+ iPhone_12_Pro_Max = "iPhone 12 Pro Max",
21
+ iPhone_13 = "iPhone 13",
22
+ iPhone_13_mini = "iPhone 13 mini",
23
+ iPhone_13_Pro = "iPhone 13 Pro",
24
+ iPhone_13_Pro_Max = "iPhone 13 Pro Max",
25
+ iPhone_14 = "iPhone 14",
26
+ iPhone_14_Plus = "iPhone 14 Plus",
27
+ iPhone_14_Pro = "iPhone 14 Pro",
28
+ iPhone_14_Pro_Max = "iPhone 14 Pro Max",
20
29
  iPhone_SE = "iPhone SE (1st generation)",
21
- iPad_Pro_3 = "iPad Pro (12.9-inch) (3rd generation)",
22
- iPad_Pro_4 = "iPad Pro (11-inch) (4th generation)",
30
+ iPhone_SE_1 = "iPhone SE (1st generation)",
31
+ iPhone_SE_2 = "iPhone SE (2nd generation)",
32
+ iPhone_SE_3 = "iPhone SE (3rd generation)",
33
+ iPad_5 = "iPad (5th generation)",
34
+ iPad_6 = "iPad (6th generation)",
23
35
  iPad_7 = "iPad (7th generation)",
36
+ iPad_8 = "iPad (8th generation)",
24
37
  iPad_9 = "iPad (9th generation)",
25
- iPad_Air_2 = "iPad Air (2nd generation)",
26
- iPad_Air_4 = "iPad Air (4th generation)"
38
+ iPad_10 = "iPad (10th generation)",
39
+ iPad_Air_2 = "iPad Air 2",
40
+ iPad_Air_3 = "iPad Air (3rd generation)",
41
+ iPad_Air_4 = "iPad Air (4th generation)",
42
+ iPad_Air_5 = "iPad Air (5th generation)",
43
+ iPad_mini_4 = "iPad mini 4",
44
+ iPad_mini_5 = "iPad mini (5th generation)",
45
+ iPad_mini_6 = "iPad mini (6th generation)",
46
+ iPad_Pro_9_7_inch_1 = "iPad Pro (9.7-inch)",
47
+ iPad_Pro_10_5_inch_1 = "iPad Pro (10.5-inch)",
48
+ iPad_Pro_11_inch_1 = "iPad Pro (11-inch) (1st generation)",
49
+ iPad_Pro_12_9_inch_1 = "iPad Pro (12.9-inch) (1st generation)",
50
+ iPad_Pro_11_inch_2 = "iPad Pro (11-inch) (2nd generation)",
51
+ iPad_Pro_12_9_inch_2 = "iPad Pro (12.9-inch) (2nd generation)",
52
+ iPad_Pro_11_inch_3 = "iPad Pro (11-inch) (3rd generation)",
53
+ iPad_Pro_12_9_inch_3 = "iPad Pro (12.9-inch) (3rd generation)",
54
+ /** @deprecated use {@link iPad_Pro_12_9_inch_3} instead */
55
+ iPad_Pro_3 = "iPad Pro (12.9-inch) (3rd generation)",
56
+ iPad_Pro_11_inch_4 = "iPad Pro (11-inch) (4th generation)",
57
+ /** @deprecated use {@link iPad_Pro_11_inch_4} instead */
58
+ iPad_Pro_4 = "iPad Pro (11-inch) (4th generation)",
59
+ iPad_Pro_12_9_inch_4 = "iPad Pro (12.9-inch) (4th generation)",
60
+ iPad_Pro_12_9_inch_5 = "iPad Pro (12.9-inch) (5th generation)",
61
+ iPad_Pro_12_9_inch_6 = "iPad Pro (12.9-inch) (6th generation)",
62
+ iPod_touch_7 = "iPod touch (7th generation)"
27
63
  }
28
64
  export type IosDeviceName = `${IosDeviceNameEnum}`;