@applitools/eyes-browser 1.4.8 → 1.4.10
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 +76 -0
- package/dist/index.js +98 -117
- package/package.json +2 -2
- package/types/enums/IosDeviceName.d.ts +1 -37
- package/types/input/RenderInfo.d.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.10](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.4.9...js/eyes-browser@1.4.10) (2024-09-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* @applitools/dom-capture bumped to 11.4.0
|
|
9
|
+
#### Features
|
|
10
|
+
|
|
11
|
+
* ability to capture all css props in computed style ([#2484](https://github.com/Applitools-Dev/sdk/issues/2484)) ([8769ee5](https://github.com/Applitools-Dev/sdk/commit/8769ee566f2d9e163437c7bcd385ec993f05f370))
|
|
12
|
+
* @applitools/driver bumped to 1.19.0
|
|
13
|
+
#### Features
|
|
14
|
+
|
|
15
|
+
* add support for env var APPLITOOLS_IS_IC ([#2469](https://github.com/Applitools-Dev/sdk/issues/2469)) ([87d7b5c](https://github.com/Applitools-Dev/sdk/commit/87d7b5cc1f7ea774c6b90504e85296f0681d0b1e))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
#### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* handle userAgent.brands returned as string ([#2453](https://github.com/Applitools-Dev/sdk/issues/2453)) ([dd6328b](https://github.com/Applitools-Dev/sdk/commit/dd6328be3e7d885714124a8e43aabaae3abecde9))
|
|
21
|
+
* searching for scrollable element multiple times ([#2493](https://github.com/Applitools-Dev/sdk/issues/2493)) ([d98db80](https://github.com/Applitools-Dev/sdk/commit/d98db8016c6312f467f244444c6f1a87bc09b7da))
|
|
22
|
+
* @applitools/core bumped to 4.18.2
|
|
23
|
+
#### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* don't call check-network when executing binary and cli ([#2491](https://github.com/Applitools-Dev/sdk/issues/2491)) ([ef00d20](https://github.com/Applitools-Dev/sdk/commit/ef00d205450b7bbe7abc1bc9bce8d6970f769091))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* @applitools/spec-driver-webdriver bumped to 1.1.12
|
|
30
|
+
|
|
31
|
+
* @applitools/spec-driver-selenium bumped to 1.5.83
|
|
32
|
+
|
|
33
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.12
|
|
34
|
+
|
|
35
|
+
* @applitools/screenshoter bumped to 3.8.36
|
|
36
|
+
|
|
37
|
+
* @applitools/nml-client bumped to 1.8.10
|
|
38
|
+
|
|
39
|
+
* @applitools/tunnel-client bumped to 1.5.8
|
|
40
|
+
#### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* upgrade execution-grid-tunnel ([#2475](https://github.com/Applitools-Dev/sdk/issues/2475)) ([e5952b4](https://github.com/Applitools-Dev/sdk/commit/e5952b4ca1bd0c065111ce1109b218f1fd68f6fc))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
* @applitools/core-base bumped to 1.16.1
|
|
47
|
+
#### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* infinity concurrency ([#2477](https://github.com/Applitools-Dev/sdk/issues/2477)) ([f488e16](https://github.com/Applitools-Dev/sdk/commit/f488e162f124acc249ed7b43b714f13c18306dc8))
|
|
50
|
+
* @applitools/ec-client bumped to 1.9.4
|
|
51
|
+
|
|
52
|
+
* @applitools/eyes bumped to 1.22.2
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [1.4.9](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.4.8...js/eyes-browser@1.4.9) (2024-08-12)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Dependencies
|
|
59
|
+
|
|
60
|
+
* @applitools/dom-capture bumped to 11.3.1
|
|
61
|
+
#### Performance Improvements
|
|
62
|
+
|
|
63
|
+
* link tag without href ([#2450](https://github.com/Applitools-Dev/sdk/issues/2450)) ([523c3cd](https://github.com/Applitools-Dev/sdk/commit/523c3cd1cb003e9144015885b522e1d82e616b7a))
|
|
64
|
+
* @applitools/core bumped to 4.18.1
|
|
65
|
+
#### Bug Fixes
|
|
66
|
+
|
|
67
|
+
* layoutbreakpoints stale dom ([#2456](https://github.com/Applitools-Dev/sdk/issues/2456)) ([a4329d6](https://github.com/Applitools-Dev/sdk/commit/a4329d6d280d27763e0c8ff6374bd26861183939))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
* @applitools/eyes bumped to 1.22.1
|
|
72
|
+
#### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* update ios devices enums ([9b4614f](https://github.com/Applitools-Dev/sdk/commit/9b4614f09bbbe42cf99824d76893f9067aab2cc4))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
3
79
|
## [1.4.8](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.4.7...js/eyes-browser@1.4.8) (2024-07-23)
|
|
4
80
|
|
|
5
81
|
|
package/dist/index.js
CHANGED
|
@@ -28262,7 +28262,7 @@ var require_open_eyes = __commonJS({
|
|
|
28262
28262
|
var throat_1 = __importDefault(require_throat());
|
|
28263
28263
|
var utils34 = __importStar(require_browser3());
|
|
28264
28264
|
function makeOpenEyes({ requests, agentId: defaultAgentId, concurrency, cwd = process.cwd(), heartbeat, logger: mainLogger }) {
|
|
28265
|
-
const throttle = concurrency ? (0, throat_1.default)(concurrency) : (fn) => fn();
|
|
28265
|
+
const throttle = concurrency && concurrency > 0 && concurrency < Infinity ? (0, throat_1.default)(concurrency) : (fn) => fn();
|
|
28266
28266
|
return async function openEyes({ settings, logger = mainLogger }) {
|
|
28267
28267
|
var _a, _b, _c;
|
|
28268
28268
|
logger = logger.extend(mainLogger, { tags: [`eyes-base-${utils34.general.shortid()}`] });
|
|
@@ -30842,6 +30842,7 @@ var require_context = __commonJS({
|
|
|
30842
30842
|
constructor(options) {
|
|
30843
30843
|
var _a, _b, _c, _d;
|
|
30844
30844
|
this._state = {};
|
|
30845
|
+
this._searchScrollingElement = true;
|
|
30845
30846
|
this._spec = options.spec;
|
|
30846
30847
|
if (options.context) {
|
|
30847
30848
|
if ((_c = (_b = (_a = this._spec).isContext) === null || _b === void 0 ? void 0 : _b.call(_a, options.context)) !== null && _c !== void 0 ? _c : this._spec.isDriver(options.context)) {
|
|
@@ -31167,6 +31168,8 @@ var require_context = __commonJS({
|
|
|
31167
31168
|
return (_a = this._element) !== null && _a !== void 0 ? _a : null;
|
|
31168
31169
|
}
|
|
31169
31170
|
async getScrollingElement() {
|
|
31171
|
+
if (!this._searchScrollingElement)
|
|
31172
|
+
return this._scrollingElement;
|
|
31170
31173
|
if (!(0, element_1.isElementInstance)(this._scrollingElement)) {
|
|
31171
31174
|
await this.focus();
|
|
31172
31175
|
if (this._scrollingElement) {
|
|
@@ -31187,6 +31190,9 @@ var require_context = __commonJS({
|
|
|
31187
31190
|
this._scrollingElement = await this.element({ type: "xpath", selector: '//*[@scrollable="true"]' });
|
|
31188
31191
|
}
|
|
31189
31192
|
}
|
|
31193
|
+
if (this._scrollingElement === null) {
|
|
31194
|
+
this._searchScrollingElement = false;
|
|
31195
|
+
}
|
|
31190
31196
|
}
|
|
31191
31197
|
return this._scrollingElement;
|
|
31192
31198
|
}
|
|
@@ -32177,9 +32183,16 @@ var require_user_agent = __commonJS({
|
|
|
32177
32183
|
};
|
|
32178
32184
|
}
|
|
32179
32185
|
function extractUserAgentObjectEnvironment(userAgent) {
|
|
32180
|
-
var _a, _b, _c, _d;
|
|
32181
|
-
|
|
32182
|
-
|
|
32186
|
+
var _a, _b, _c, _d, _e, _f;
|
|
32187
|
+
if (typeof userAgent.brands === "string") {
|
|
32188
|
+
try {
|
|
32189
|
+
userAgent.brands = JSON.parse(userAgent.brands);
|
|
32190
|
+
} catch (e) {
|
|
32191
|
+
userAgent.brands = [];
|
|
32192
|
+
}
|
|
32193
|
+
}
|
|
32194
|
+
const chromiumBrand = (_b = (_a = userAgent.brands) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (brand) => /Chromium/i.test(brand.brand));
|
|
32195
|
+
const browserBrand = (_e = (_d = (_c = userAgent.brands) === null || _c === void 0 ? void 0 : _c.find) === null || _d === void 0 ? void 0 : _d.call(_c, (brand) => brand !== chromiumBrand && !/Not.?A.?Brand/i.test(brand.brand))) !== null && _e !== void 0 ? _e : chromiumBrand;
|
|
32183
32196
|
const environment = {
|
|
32184
32197
|
browserName: browserBrand === null || browserBrand === void 0 ? void 0 : browserBrand.brand,
|
|
32185
32198
|
browserVersion: browserBrand === null || browserBrand === void 0 ? void 0 : browserBrand.version,
|
|
@@ -32193,7 +32206,7 @@ var require_user_agent = __commonJS({
|
|
|
32193
32206
|
environment.platformVersion = windowsVersionsMapping[environment.platformVersion];
|
|
32194
32207
|
} else if (environment.platformName === "macOS") {
|
|
32195
32208
|
environment.platformName = "Mac OS X";
|
|
32196
|
-
environment.platformVersion = (
|
|
32209
|
+
environment.platformVersion = (_f = environment.platformVersion) === null || _f === void 0 ? void 0 : _f.split(/[._]/, 2).join(".");
|
|
32197
32210
|
}
|
|
32198
32211
|
return environment;
|
|
32199
32212
|
}
|
|
@@ -32636,7 +32649,7 @@ var require_driver = __commonJS({
|
|
|
32636
32649
|
this._environment.isEmulation = true;
|
|
32637
32650
|
}
|
|
32638
32651
|
const driverUrl = (_d = await this.getDriverUrl()) !== null && _d !== void 0 ? _d : "";
|
|
32639
|
-
this._environment.isEC = this._environment.isECClient || /exec-wus
|
|
32652
|
+
this._environment.isEC = this._environment.isECClient || utils34.general.getEnvValue("IS_EC", "boolean") || /exec-wus\.applitools\.com/.test(driverUrl);
|
|
32640
32653
|
this._environment.isKobiton = /kobiton/.test(driverUrl);
|
|
32641
32654
|
this._logger.log("Extracted environment", this._environment);
|
|
32642
32655
|
}
|
|
@@ -34937,11 +34950,11 @@ var require_captureDomPollCjs = __commonJS({
|
|
|
34937
34950
|
return false;
|
|
34938
34951
|
};
|
|
34939
34952
|
const w = g, E = y;
|
|
34940
|
-
const { absolutizeUrl: C, isInlineFrame: T } = l,
|
|
34941
|
-
const { absolutizeUrl: R, isInlineFrame: $ } = l,
|
|
34953
|
+
const { absolutizeUrl: C, isInlineFrame: T } = l, b = p, N = g, S = y, { NODE_TYPES: A } = d;
|
|
34954
|
+
const { absolutizeUrl: R, isInlineFrame: $ } = l, P = function(e4) {
|
|
34942
34955
|
const t4 = e4 ? e4.match(f) : void 0;
|
|
34943
34956
|
return t4 ? t4[1] : t4;
|
|
34944
|
-
},
|
|
34957
|
+
}, _ = async function({ bgImages: e4, timeout: t4 = 5e3, Image: n3 = window.Image }) {
|
|
34945
34958
|
return (await Promise.all(Array.from(e4).map((e5) => {
|
|
34946
34959
|
return Promise.race([new Promise((t5) => {
|
|
34947
34960
|
const o3 = new n3();
|
|
@@ -34981,16 +34994,19 @@ ${r2}${t5}${r2}`;
|
|
|
34981
34994
|
/** ${d2} **/
|
|
34982
34995
|
${l2}`}`, { bundledCss: i2, unfetchedResources: u2 };
|
|
34983
34996
|
};
|
|
34984
|
-
}, D = p, O = function(e4) {
|
|
34985
|
-
const t4 = ["before", "after"];
|
|
34997
|
+
}, D = p, O = function(e4, t4) {
|
|
34986
34998
|
try {
|
|
34987
|
-
|
|
34988
|
-
|
|
34989
|
-
|
|
34990
|
-
|
|
34991
|
-
|
|
34999
|
+
return ["before", "after"].reduce((n3, o2) => {
|
|
35000
|
+
const r2 = e4.ownerDocument.defaultView.getComputedStyle(e4, `:${o2}`);
|
|
35001
|
+
if (r2 && "none" !== r2.getPropertyValue("content")) {
|
|
35002
|
+
(n3 = n3 != null ? n3 : {})[o2] = {};
|
|
35003
|
+
for (const e5 of t4)
|
|
35004
|
+
n3[o2][e5] = r2.getPropertyValue(e5);
|
|
35005
|
+
}
|
|
35006
|
+
return n3;
|
|
35007
|
+
}, void 0);
|
|
34992
35008
|
} catch (e5) {
|
|
34993
|
-
return
|
|
35009
|
+
return;
|
|
34994
35010
|
}
|
|
34995
35011
|
}, F = function(e4, { fetchTimeLimit: t4 } = {}) {
|
|
34996
35012
|
return async function(n3) {
|
|
@@ -35012,9 +35028,9 @@ ${l2}`}`, { bundledCss: i2, unfetchedResources: u2 };
|
|
|
35012
35028
|
r2 = Array.from(n3.childNodes).map((e5) => e5.nodeValue).join(""), s2 = o2;
|
|
35013
35029
|
else if (n3 && E(n3)) {
|
|
35014
35030
|
const c2 = w(n3);
|
|
35015
|
-
|
|
35031
|
+
c2 ? function(e5) {
|
|
35016
35032
|
return e5 && e5.startsWith("data:");
|
|
35017
|
-
}(c2) ? (s2 =
|
|
35033
|
+
}(c2) ? (s2 = o2, r2 = c2.match(/,(.+)/)[1]) : (s2 = t4(c2, o2), r2 = e4(s2)) : r2 = "", a2 = void 0 === r2;
|
|
35018
35034
|
}
|
|
35019
35035
|
return { cssText: r2, styleBaseUrl: s2, isUnfetched: a2 };
|
|
35020
35036
|
};
|
|
@@ -35036,7 +35052,7 @@ ${l2}`}`, { bundledCss: i2, unfetchedResources: u2 };
|
|
|
35036
35052
|
function c2(e5) {
|
|
35037
35053
|
if (s3.push(async function(e6, n5, o4) {
|
|
35038
35054
|
let r4, s4;
|
|
35039
|
-
e6 && S(e6) && (s4 = C(
|
|
35055
|
+
e6 && S(e6) && (s4 = C(N(e6), n5), r4 = await t4(s4), void 0 !== r4 && (o4[s4] = r4)), r4 && await a2(r4, s4, o4);
|
|
35040
35056
|
}(e5, o3, r3)), e5.nodeType === A.ELEMENT)
|
|
35041
35057
|
return "IFRAME" === e5.tagName.toUpperCase() ? i2(e5) : u2(e5);
|
|
35042
35058
|
}
|
|
@@ -35058,7 +35074,7 @@ ${l2}`}`, { bundledCss: i2, unfetchedResources: u2 };
|
|
|
35058
35074
|
};
|
|
35059
35075
|
async function a2(e4, n4, o3) {
|
|
35060
35076
|
try {
|
|
35061
|
-
const r3 =
|
|
35077
|
+
const r3 = b(e4), s3 = [];
|
|
35062
35078
|
for (const e5 of Array.from(r3.cssRules))
|
|
35063
35079
|
e5 instanceof CSSImportRule && s3.push((async () => {
|
|
35064
35080
|
const r4 = C(e5.href, n4), s4 = await t4(r4);
|
|
@@ -35071,35 +35087,35 @@ ${l2}`}`, { bundledCss: i2, unfetchedResources: u2 };
|
|
|
35071
35087
|
}
|
|
35072
35088
|
};
|
|
35073
35089
|
}, { NODE_TYPES: x, DEFAULT_STYLE_PROPS: M, DEFAULT_RECT_PROPS: V, DEFAULT_IGNORED_TAG_NAMES: B } = d;
|
|
35074
|
-
const { pollify: Y } = l, { EYES_NAMESPACE: z, DOM_CAPTURE_KEY:
|
|
35075
|
-
arguments[1] && (t4 = arguments[1]), arguments[2] && (
|
|
35076
|
-
const
|
|
35077
|
-
function
|
|
35090
|
+
const { pollify: Y } = l, { EYES_NAMESPACE: z, DOM_CAPTURE_KEY: j } = d, G = async function({ doc: t4 = e3, styleProps: n3 = M, rectProps: o2 = V, ignoredTagNames: r2 = B, capturePseudo: s2 = false, addStats: a2 = false, fetchTimeLimit: c2 = 3e4 } = {}) {
|
|
35091
|
+
arguments[1] && (t4 = arguments[1]), arguments[2] && (a2 = arguments[2]), arguments[3] && (c2 = arguments[3]), true === n3 && (n3 = [...getComputedStyle(t4.body)]);
|
|
35092
|
+
const u2 = { total: {}, prefetchCss: {}, doCaptureDoc: {}, waitForImages: {} };
|
|
35093
|
+
function i2(e4) {
|
|
35078
35094
|
e4.startTime = Date.now();
|
|
35079
35095
|
}
|
|
35080
|
-
function
|
|
35096
|
+
function l2(e4) {
|
|
35081
35097
|
e4.endTime = Date.now(), e4.elapsedTime = e4.endTime - e4.startTime;
|
|
35082
35098
|
}
|
|
35083
|
-
const
|
|
35084
|
-
u2
|
|
35085
|
-
const
|
|
35086
|
-
u2
|
|
35087
|
-
const
|
|
35088
|
-
|
|
35089
|
-
const
|
|
35090
|
-
u2
|
|
35091
|
-
const
|
|
35092
|
-
const
|
|
35093
|
-
let
|
|
35094
|
-
const
|
|
35095
|
-
return
|
|
35096
|
-
function
|
|
35099
|
+
const d2 = [];
|
|
35100
|
+
i2(u2.total);
|
|
35101
|
+
const f2 = /* @__PURE__ */ new Set(), m2 = [], h2 = "@@@@@", p2 = "#####", g2 = "-----";
|
|
35102
|
+
i2(u2.prefetchCss);
|
|
35103
|
+
const y2 = L(F(fetch, { fetchTimeLimit: c2 })), w2 = await y2(t4);
|
|
35104
|
+
l2(u2.prefetchCss);
|
|
35105
|
+
const E2 = U({ parseCss: D, CSSImportRule, getCssFromCache: w2, absolutizeUrl: R, unfetchedToken: p2 }), C2 = I({ getCssFromCache: w2, absolutizeUrl: R }), T2 = k({ extractCssFromNode: C2, getBundledCssFromCssText: E2, unfetchedToken: p2 });
|
|
35106
|
+
i2(u2.doCaptureDoc);
|
|
35107
|
+
const b2 = function a3(c3, u3 = c3.location && c3.location.href) {
|
|
35108
|
+
const i3 = /* @__PURE__ */ new Set();
|
|
35109
|
+
let l3 = "";
|
|
35110
|
+
const p3 = g3(c3.documentElement || c3);
|
|
35111
|
+
return p3.css = l3, d2.push(_({ bgImages: i3 }).then((e4) => p3.images = e4)), p3;
|
|
35112
|
+
function g3(t5) {
|
|
35097
35113
|
if (t5.hasAttribute && t5.hasAttribute("data-applitools-skip"))
|
|
35098
35114
|
return null;
|
|
35099
|
-
const { bundledCss: n4, unfetchedResources: o3 } =
|
|
35100
|
-
if (
|
|
35115
|
+
const { bundledCss: n4, unfetchedResources: o3 } = T2(t5, u3);
|
|
35116
|
+
if (l3 += n4, o3)
|
|
35101
35117
|
for (const e4 of o3)
|
|
35102
|
-
|
|
35118
|
+
f2.add(e4);
|
|
35103
35119
|
switch (t5.nodeType) {
|
|
35104
35120
|
case x.TEXT:
|
|
35105
35121
|
return function(t6) {
|
|
@@ -35110,7 +35126,7 @@ ${l2}`}`, { bundledCss: i2, unfetchedResources: u2 };
|
|
|
35110
35126
|
}(t5);
|
|
35111
35127
|
case x.ELEMENT:
|
|
35112
35128
|
return "IFRAME" === t5.tagName.toUpperCase() ? function(e4) {
|
|
35113
|
-
const t6 =
|
|
35129
|
+
const t6 = y3(e4);
|
|
35114
35130
|
let n5;
|
|
35115
35131
|
try {
|
|
35116
35132
|
n5 = e4.contentDocument;
|
|
@@ -35118,61 +35134,61 @@ ${l2}`}`, { bundledCss: i2, unfetchedResources: u2 };
|
|
|
35118
35134
|
return o4(), t6;
|
|
35119
35135
|
}
|
|
35120
35136
|
try {
|
|
35121
|
-
n5 ? t6.childNodes = [
|
|
35137
|
+
n5 ? t6.childNodes = [a3(n5, $(e4) ? e4.baseURI : n5.location.href)] : o4();
|
|
35122
35138
|
} catch (e5) {
|
|
35123
35139
|
console.log("error in iframeToJSON", e5);
|
|
35124
35140
|
}
|
|
35125
35141
|
return t6;
|
|
35126
35142
|
function o4() {
|
|
35127
35143
|
const n6 = v(e4);
|
|
35128
|
-
|
|
35144
|
+
m2.push(n6), t6.childNodes = [`${h2}${n6}${h2}`];
|
|
35129
35145
|
}
|
|
35130
|
-
}(t5) :
|
|
35146
|
+
}(t5) : y3(t5);
|
|
35131
35147
|
case x.DOCUMENT_FRAGMENT:
|
|
35132
|
-
return { childNodes: Array.prototype.map.call(t5.childNodes,
|
|
35148
|
+
return { childNodes: Array.prototype.map.call(t5.childNodes, g3).filter(Boolean) };
|
|
35133
35149
|
default:
|
|
35134
35150
|
return null;
|
|
35135
35151
|
}
|
|
35136
35152
|
}
|
|
35137
|
-
function
|
|
35138
|
-
const
|
|
35139
|
-
if (r2.indexOf(
|
|
35153
|
+
function y3(e4) {
|
|
35154
|
+
const c4 = Array.prototype.map.call(e4.childNodes, g3).filter(Boolean), l4 = e4.shadowRoot && a3(e4.shadowRoot, u3), d3 = e4.tagName.toUpperCase();
|
|
35155
|
+
if (r2.indexOf(d3) > -1)
|
|
35140
35156
|
return null;
|
|
35141
|
-
const
|
|
35157
|
+
const f3 = t4.defaultView.getComputedStyle(e4), m3 = e4.getBoundingClientRect(), h3 = {};
|
|
35142
35158
|
for (const e5 of n3)
|
|
35143
|
-
|
|
35144
|
-
|
|
35145
|
-
const
|
|
35159
|
+
h3[e5] = f3.getPropertyValue(e5);
|
|
35160
|
+
h3["border-width"] || (h3["border-width"] = `${f3.getPropertyValue("border-top-width")} ${f3.getPropertyValue("border-right-width")} ${f3.getPropertyValue("border-bottom-width")} ${f3.getPropertyValue("border-left-width")}`);
|
|
35161
|
+
const p4 = {};
|
|
35146
35162
|
for (const e5 of o2)
|
|
35147
|
-
|
|
35148
|
-
const
|
|
35149
|
-
"INPUT" !==
|
|
35150
|
-
const
|
|
35151
|
-
|
|
35152
|
-
const
|
|
35153
|
-
|
|
35154
|
-
const
|
|
35155
|
-
return
|
|
35163
|
+
p4[e5] = m3[e5];
|
|
35164
|
+
const y4 = Array.from(e4.attributes).map((e5) => ({ key: e5.name, value: e5.value })).reduce((e5, t5) => (e5[t5.key] = t5.value, e5), {});
|
|
35165
|
+
"INPUT" !== d3 && "TEXTAREA" !== d3 || !e4.value || (y4.value && console.log(`[captureFrame] Overriding element attributes value from ${y4.value} to ${e4.value}`), y4.value = e4.value);
|
|
35166
|
+
const w3 = P(f3.getPropertyValue("background-image"));
|
|
35167
|
+
w3 && i3.add(w3);
|
|
35168
|
+
const E3 = O(e4, n3), C3 = s2 ? E3 : void 0;
|
|
35169
|
+
E3 && (y4["data-applitools-has-pseudo"] = Object.keys(E3).join("_and_"));
|
|
35170
|
+
const T3 = { tagName: d3, style: z2(h3), rect: z2(p4), attributes: z2(y4), childNodes: c4, pseudo: C3 };
|
|
35171
|
+
return l4 && (T3.shadowRoot = l4), T3;
|
|
35156
35172
|
}
|
|
35157
35173
|
}(t4);
|
|
35158
|
-
|
|
35159
|
-
const N2 =
|
|
35160
|
-
` : "",
|
|
35161
|
-
` : "",
|
|
35162
|
-
|
|
35163
|
-
const
|
|
35164
|
-
${
|
|
35165
|
-
${N2}${
|
|
35166
|
-
${JSON.stringify(
|
|
35167
|
-
${
|
|
35168
|
-
${JSON.stringify(
|
|
35169
|
-
return console.log("[captureFrame]", JSON.stringify(
|
|
35170
|
-
function
|
|
35174
|
+
l2(u2.doCaptureDoc), i2(u2.waitForImages), await Promise.all(d2), l2(u2.waitForImages), b2.version = "1.3.0", b2.scriptVersion = "11.4.0";
|
|
35175
|
+
const N2 = m2.length ? `${m2.join("\n")}
|
|
35176
|
+
` : "", S2 = f2.size ? `${Array.from(f2).join("\n")}
|
|
35177
|
+
` : "", A2 = JSON.stringify({ separator: g2, cssStartToken: p2, cssEndToken: p2, iframeStartToken: `"${h2}`, iframeEndToken: `${h2}"` });
|
|
35178
|
+
l2(u2.total);
|
|
35179
|
+
const Y2 = `${A2}
|
|
35180
|
+
${S2}${g2}
|
|
35181
|
+
${N2}${g2}
|
|
35182
|
+
${JSON.stringify(b2)}${a2 ? `
|
|
35183
|
+
${g2}
|
|
35184
|
+
${JSON.stringify(u2)}` : ""}`;
|
|
35185
|
+
return console.log("[captureFrame]", JSON.stringify(u2)), Y2;
|
|
35186
|
+
function z2(e4) {
|
|
35171
35187
|
return Object.keys(e4).length ? e4 : void 0;
|
|
35172
35188
|
}
|
|
35173
35189
|
};
|
|
35174
35190
|
window[z] = window[z] || {};
|
|
35175
|
-
const J = Y(
|
|
35191
|
+
const J = Y(G, window[z], j);
|
|
35176
35192
|
return function(e4) {
|
|
35177
35193
|
return e4 && e4.__esModule && Object.prototype.hasOwnProperty.call(e4, "default") ? e4.default : e4;
|
|
35178
35194
|
}(function(e4) {
|
|
@@ -44112,7 +44128,7 @@ var require_take_dom_snapshots = __commonJS({
|
|
|
44112
44128
|
await (0, wait_for_lazy_load_1.waitForLazyLoad)({ context: currentContext, settings: settings.lazyLoad, logger });
|
|
44113
44129
|
}
|
|
44114
44130
|
await beforeEachSnapshot();
|
|
44115
|
-
if (settings.elementReferences
|
|
44131
|
+
if (settings.elementReferences) {
|
|
44116
44132
|
safeSelectorResult = await (0, generate_safe_selectors_1.generateSafeSelectors)({
|
|
44117
44133
|
context: currentContext,
|
|
44118
44134
|
elementReferences: settings.elementReferences
|
|
@@ -87317,7 +87333,7 @@ var require_package2 = __commonJS({
|
|
|
87317
87333
|
"../core/package.json"(exports, module) {
|
|
87318
87334
|
module.exports = {
|
|
87319
87335
|
name: "@applitools/core",
|
|
87320
|
-
version: "4.18.
|
|
87336
|
+
version: "4.18.2",
|
|
87321
87337
|
homepage: "https://applitools.com",
|
|
87322
87338
|
bugs: {
|
|
87323
87339
|
url: "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -91436,7 +91452,7 @@ var require_package3 = __commonJS({
|
|
|
91436
91452
|
"../eyes/package.json"(exports, module) {
|
|
91437
91453
|
module.exports = {
|
|
91438
91454
|
name: "@applitools/eyes",
|
|
91439
|
-
version: "1.22.
|
|
91455
|
+
version: "1.22.2",
|
|
91440
91456
|
keywords: [
|
|
91441
91457
|
"applitools",
|
|
91442
91458
|
"eyes",
|
|
@@ -91644,44 +91660,19 @@ init_setImmediate();
|
|
|
91644
91660
|
init_buffer();
|
|
91645
91661
|
init_setInterval();
|
|
91646
91662
|
var IosDeviceNameEnum = /* @__PURE__ */ ((IosDeviceNameEnum2) => {
|
|
91647
|
-
IosDeviceNameEnum2["iPad_5"] = "iPad (5th generation)";
|
|
91648
|
-
IosDeviceNameEnum2["iPad_6"] = "iPad (6th generation)";
|
|
91649
91663
|
IosDeviceNameEnum2["iPad_7"] = "iPad (7th generation)";
|
|
91650
|
-
IosDeviceNameEnum2["iPad_8"] = "iPad (8th generation)";
|
|
91651
91664
|
IosDeviceNameEnum2["iPad_9"] = "iPad (9th generation)";
|
|
91652
|
-
IosDeviceNameEnum2["iPad_10"] = "iPad (10th generation)";
|
|
91653
|
-
IosDeviceNameEnum2["iPad_Air_2"] = "iPad Air 2";
|
|
91654
|
-
IosDeviceNameEnum2["iPad_Air_3"] = "iPad Air (3rd generation)";
|
|
91655
91665
|
IosDeviceNameEnum2["iPad_Air_4"] = "iPad Air (4th generation)";
|
|
91656
|
-
IosDeviceNameEnum2["iPad_Air_5"] = "iPad Air (5th generation)";
|
|
91657
|
-
IosDeviceNameEnum2["iPad_mini_4"] = "iPad mini 4";
|
|
91658
|
-
IosDeviceNameEnum2["iPad_mini_5"] = "iPad mini (5th generation)";
|
|
91659
|
-
IosDeviceNameEnum2["iPad_mini_6"] = "iPad mini (6th generation)";
|
|
91660
|
-
IosDeviceNameEnum2["iPad_Pro_9_7_inch_1"] = "iPad Pro (9.7-inch)";
|
|
91661
|
-
IosDeviceNameEnum2["iPad_Pro_10_5_inch_1"] = "iPad Pro (10.5-inch)";
|
|
91662
|
-
IosDeviceNameEnum2["iPad_Pro_11_inch_1"] = "iPad Pro (11-inch) (1st generation)";
|
|
91663
|
-
IosDeviceNameEnum2["iPad_Pro_12_9_inch_1"] = "iPad Pro (12.9-inch) (1st generation)";
|
|
91664
|
-
IosDeviceNameEnum2["iPad_Pro_11_inch_2"] = "iPad Pro (11-inch) (2nd generation)";
|
|
91665
|
-
IosDeviceNameEnum2["iPad_Pro_12_9_inch_2"] = "iPad Pro (12.9-inch) (2nd generation)";
|
|
91666
|
-
IosDeviceNameEnum2["iPad_Pro_11_inch_3"] = "iPad Pro (11-inch) (3rd generation)";
|
|
91667
91666
|
IosDeviceNameEnum2["iPad_Pro_3"] = "iPad Pro (12.9-inch) (3rd generation)";
|
|
91668
91667
|
IosDeviceNameEnum2["iPad_Pro_12_9_inch_3"] = "iPad Pro (12.9-inch) (3rd generation)";
|
|
91669
91668
|
IosDeviceNameEnum2["iPad_Pro_4"] = "iPad Pro (11-inch) (4th generation)";
|
|
91670
91669
|
IosDeviceNameEnum2["iPad_Pro_11_inch_4"] = "iPad Pro (11-inch) (4th generation)";
|
|
91671
|
-
IosDeviceNameEnum2["iPad_Pro_12_9_inch_4"] = "iPad Pro (12.9-inch) (4th generation)";
|
|
91672
|
-
IosDeviceNameEnum2["iPad_Pro_12_9_inch_5"] = "iPad Pro (12.9-inch) (5th generation)";
|
|
91673
|
-
IosDeviceNameEnum2["iPad_Pro_12_9_inch_6"] = "iPad Pro (12.9-inch) (6th generation)";
|
|
91674
|
-
IosDeviceNameEnum2["iPhone_6s"] = "iPhone 6s";
|
|
91675
|
-
IosDeviceNameEnum2["iPhone_6s_Plus"] = "iPhone 6s Plus";
|
|
91676
|
-
IosDeviceNameEnum2["iPhone_7"] = "iPhone 7";
|
|
91677
|
-
IosDeviceNameEnum2["iPhone_7_Plus"] = "iPhone 7 Plus";
|
|
91678
91670
|
IosDeviceNameEnum2["iPhone_8"] = "iPhone 8";
|
|
91679
91671
|
IosDeviceNameEnum2["iPhone_8_Plus"] = "iPhone 8 Plus";
|
|
91680
91672
|
IosDeviceNameEnum2["iPhone_X"] = "iPhone X";
|
|
91681
91673
|
IosDeviceNameEnum2["iPhone_XR"] = "iPhone XR";
|
|
91682
91674
|
IosDeviceNameEnum2["iPhone_XS"] = "iPhone Xs";
|
|
91683
91675
|
IosDeviceNameEnum2["iPhone_Xs"] = "iPhone Xs";
|
|
91684
|
-
IosDeviceNameEnum2["iPhone_Xs_Max"] = "iPhone Xs Max";
|
|
91685
91676
|
IosDeviceNameEnum2["iPhone_11"] = "iPhone 11";
|
|
91686
91677
|
IosDeviceNameEnum2["iPhone_11_Pro_Max"] = "iPhone 11 Pro Max";
|
|
91687
91678
|
IosDeviceNameEnum2["iPhone_11_Pro"] = "iPhone 11 Pro";
|
|
@@ -91690,22 +91681,12 @@ var IosDeviceNameEnum = /* @__PURE__ */ ((IosDeviceNameEnum2) => {
|
|
|
91690
91681
|
IosDeviceNameEnum2["iPhone_12_Pro_Max"] = "iPhone 12 Pro Max";
|
|
91691
91682
|
IosDeviceNameEnum2["iPhone_12_Pro"] = "iPhone 12 Pro";
|
|
91692
91683
|
IosDeviceNameEnum2["iPhone_13"] = "iPhone 13";
|
|
91693
|
-
IosDeviceNameEnum2["iPhone_13_mini"] = "iPhone 13 mini";
|
|
91694
91684
|
IosDeviceNameEnum2["iPhone_13_Pro_Max"] = "iPhone 13 Pro Max";
|
|
91695
91685
|
IosDeviceNameEnum2["iPhone_13_Pro"] = "iPhone 13 Pro";
|
|
91696
91686
|
IosDeviceNameEnum2["iPhone_14"] = "iPhone 14";
|
|
91697
|
-
IosDeviceNameEnum2["iPhone_14_Plus"] = "iPhone 14 Plus";
|
|
91698
|
-
IosDeviceNameEnum2["iPhone_14_Pro"] = "iPhone 14 Pro";
|
|
91699
91687
|
IosDeviceNameEnum2["iPhone_14_Pro_Max"] = "iPhone 14 Pro Max";
|
|
91700
91688
|
IosDeviceNameEnum2["iPhone_15"] = "iPhone 15";
|
|
91701
|
-
IosDeviceNameEnum2["iPhone_15_Plus"] = "iPhone 15 Plus";
|
|
91702
|
-
IosDeviceNameEnum2["iPhone_15_Pro"] = "iPhone 15 Pro";
|
|
91703
91689
|
IosDeviceNameEnum2["iPhone_15_Pro_Max"] = "iPhone 15 Pro Max";
|
|
91704
|
-
IosDeviceNameEnum2["iPhone_SE"] = "iPhone SE (1st generation)";
|
|
91705
|
-
IosDeviceNameEnum2["iPhone_SE_1"] = "iPhone SE (1st generation)";
|
|
91706
|
-
IosDeviceNameEnum2["iPhone_SE_2"] = "iPhone SE (2nd generation)";
|
|
91707
|
-
IosDeviceNameEnum2["iPhone_SE_3"] = "iPhone SE (3rd generation)";
|
|
91708
|
-
IosDeviceNameEnum2["iPod_touch_7"] = "iPod touch (7th generation)";
|
|
91709
91690
|
return IosDeviceNameEnum2;
|
|
91710
91691
|
})(IosDeviceNameEnum || {});
|
|
91711
91692
|
|
|
@@ -95114,7 +95095,7 @@ var ConfigurationData = class {
|
|
|
95114
95095
|
}),
|
|
95115
95096
|
check: utils20.general.removeUndefinedProps({
|
|
95116
95097
|
environments: (_b = this.browsersInfo) == null ? void 0 : _b.map((browserInfo) => {
|
|
95117
|
-
if (utils20.types.has(browserInfo, "iosDeviceInfo")) {
|
|
95098
|
+
if (utils20.types.has(browserInfo, "iosDeviceInfo") && utils20.types.has(browserInfo.iosDeviceInfo, "iosVersion")) {
|
|
95118
95099
|
const { iosVersion, ...iosDeviceInfo } = browserInfo.iosDeviceInfo;
|
|
95119
95100
|
return { iosDeviceInfo: { ...iosDeviceInfo, version: iosVersion } };
|
|
95120
95101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-browser",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"applitools",
|
|
6
6
|
"browser",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@applitools/eyes": "1.22.
|
|
51
|
+
"@applitools/eyes": "1.22.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^12.20.55",
|
|
@@ -1,37 +1,13 @@
|
|
|
1
1
|
export declare enum IosDeviceNameEnum {
|
|
2
|
-
iPad_5 = "iPad (5th generation)",
|
|
3
|
-
iPad_6 = "iPad (6th generation)",
|
|
4
2
|
iPad_7 = "iPad (7th generation)",
|
|
5
|
-
iPad_8 = "iPad (8th generation)",
|
|
6
3
|
iPad_9 = "iPad (9th generation)",
|
|
7
|
-
iPad_10 = "iPad (10th generation)",
|
|
8
|
-
iPad_Air_2 = "iPad Air 2",
|
|
9
|
-
iPad_Air_3 = "iPad Air (3rd generation)",
|
|
10
4
|
iPad_Air_4 = "iPad Air (4th generation)",
|
|
11
|
-
iPad_Air_5 = "iPad Air (5th generation)",
|
|
12
|
-
iPad_mini_4 = "iPad mini 4",
|
|
13
|
-
iPad_mini_5 = "iPad mini (5th generation)",
|
|
14
|
-
iPad_mini_6 = "iPad mini (6th generation)",
|
|
15
|
-
iPad_Pro_9_7_inch_1 = "iPad Pro (9.7-inch)",
|
|
16
|
-
iPad_Pro_10_5_inch_1 = "iPad Pro (10.5-inch)",
|
|
17
|
-
iPad_Pro_11_inch_1 = "iPad Pro (11-inch) (1st generation)",
|
|
18
|
-
iPad_Pro_12_9_inch_1 = "iPad Pro (12.9-inch) (1st generation)",
|
|
19
|
-
iPad_Pro_11_inch_2 = "iPad Pro (11-inch) (2nd generation)",
|
|
20
|
-
iPad_Pro_12_9_inch_2 = "iPad Pro (12.9-inch) (2nd generation)",
|
|
21
|
-
iPad_Pro_11_inch_3 = "iPad Pro (11-inch) (3rd generation)",
|
|
22
5
|
/** @deprecated use {@link iPad_Pro_12_9_inch_3 } instead */
|
|
23
6
|
iPad_Pro_3 = "iPad Pro (12.9-inch) (3rd generation)",
|
|
24
7
|
iPad_Pro_12_9_inch_3 = "iPad Pro (12.9-inch) (3rd generation)",
|
|
25
8
|
/** @deprecated use {@link iPad_Pro_11_inch_4 } instead */
|
|
26
9
|
iPad_Pro_4 = "iPad Pro (11-inch) (4th generation)",
|
|
27
10
|
iPad_Pro_11_inch_4 = "iPad Pro (11-inch) (4th generation)",
|
|
28
|
-
iPad_Pro_12_9_inch_4 = "iPad Pro (12.9-inch) (4th generation)",
|
|
29
|
-
iPad_Pro_12_9_inch_5 = "iPad Pro (12.9-inch) (5th generation)",
|
|
30
|
-
iPad_Pro_12_9_inch_6 = "iPad Pro (12.9-inch) (6th generation)",
|
|
31
|
-
iPhone_6s = "iPhone 6s",
|
|
32
|
-
iPhone_6s_Plus = "iPhone 6s Plus",
|
|
33
|
-
iPhone_7 = "iPhone 7",
|
|
34
|
-
iPhone_7_Plus = "iPhone 7 Plus",
|
|
35
11
|
iPhone_8 = "iPhone 8",
|
|
36
12
|
iPhone_8_Plus = "iPhone 8 Plus",
|
|
37
13
|
iPhone_X = "iPhone X",
|
|
@@ -39,7 +15,6 @@ export declare enum IosDeviceNameEnum {
|
|
|
39
15
|
/** @deprecated use {@link iPhone_Xs } instead */
|
|
40
16
|
iPhone_XS = "iPhone Xs",
|
|
41
17
|
iPhone_Xs = "iPhone Xs",
|
|
42
|
-
iPhone_Xs_Max = "iPhone Xs Max",
|
|
43
18
|
iPhone_11 = "iPhone 11",
|
|
44
19
|
iPhone_11_Pro_Max = "iPhone 11 Pro Max",
|
|
45
20
|
iPhone_11_Pro = "iPhone 11 Pro",
|
|
@@ -48,22 +23,11 @@ export declare enum IosDeviceNameEnum {
|
|
|
48
23
|
iPhone_12_Pro_Max = "iPhone 12 Pro Max",
|
|
49
24
|
iPhone_12_Pro = "iPhone 12 Pro",
|
|
50
25
|
iPhone_13 = "iPhone 13",
|
|
51
|
-
iPhone_13_mini = "iPhone 13 mini",
|
|
52
26
|
iPhone_13_Pro_Max = "iPhone 13 Pro Max",
|
|
53
27
|
iPhone_13_Pro = "iPhone 13 Pro",
|
|
54
28
|
iPhone_14 = "iPhone 14",
|
|
55
|
-
iPhone_14_Plus = "iPhone 14 Plus",
|
|
56
|
-
iPhone_14_Pro = "iPhone 14 Pro",
|
|
57
29
|
iPhone_14_Pro_Max = "iPhone 14 Pro Max",
|
|
58
30
|
iPhone_15 = "iPhone 15",
|
|
59
|
-
|
|
60
|
-
iPhone_15_Pro = "iPhone 15 Pro",
|
|
61
|
-
iPhone_15_Pro_Max = "iPhone 15 Pro Max",
|
|
62
|
-
/** @deprecated use {@link iPhone_SE_1 } instead */
|
|
63
|
-
iPhone_SE = "iPhone SE (1st generation)",
|
|
64
|
-
iPhone_SE_1 = "iPhone SE (1st generation)",
|
|
65
|
-
iPhone_SE_2 = "iPhone SE (2nd generation)",
|
|
66
|
-
iPhone_SE_3 = "iPhone SE (3rd generation)",
|
|
67
|
-
iPod_touch_7 = "iPod touch (7th generation)"
|
|
31
|
+
iPhone_15_Pro_Max = "iPhone 15 Pro Max"
|
|
68
32
|
}
|
|
69
33
|
export type IosDeviceName = `${IosDeviceNameEnum}`;
|
|
@@ -47,7 +47,9 @@ export type AndroidDeviceInfo = {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export type IOSMultiDeviceInfo = {
|
|
50
|
-
|
|
50
|
+
iosDeviceInfo: {
|
|
51
|
+
deviceName: IosMultiDeviceTarget;
|
|
52
|
+
};
|
|
51
53
|
};
|
|
52
54
|
export type RenderInfoLegacy = RenderInfoBase & (DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | AndroidDeviceInfo | ChromeEmulationInfoLegacy);
|
|
53
55
|
export type RenderInfo = RenderInfoBase & (DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | AndroidDeviceInfo | IOSMultiDeviceInfo);
|