@lambdatest/smartui-cli 4.1.49 → 4.1.51
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/dist/index.cjs +40 -15
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -1337,6 +1337,18 @@ var FigmaWebConfigSchema = {
|
|
|
1337
1337
|
"type": "string"
|
|
1338
1338
|
},
|
|
1339
1339
|
uniqueItems: false
|
|
1340
|
+
},
|
|
1341
|
+
"screenshot_viewports": {
|
|
1342
|
+
"type": "array",
|
|
1343
|
+
"items": {
|
|
1344
|
+
"type": "array",
|
|
1345
|
+
"items": {
|
|
1346
|
+
"type": "integer",
|
|
1347
|
+
"minimum": 1
|
|
1348
|
+
},
|
|
1349
|
+
"minItems": 1,
|
|
1350
|
+
"maxItems": 2
|
|
1351
|
+
}
|
|
1340
1352
|
}
|
|
1341
1353
|
},
|
|
1342
1354
|
"required": ["figma_file_token", "figma_ids"]
|
|
@@ -1544,6 +1556,10 @@ function launchBrowsers(ctx) {
|
|
|
1544
1556
|
let browsers = {};
|
|
1545
1557
|
const isHeadless = ((_a = process.env.HEADLESS) == null ? void 0 : _a.toLowerCase()) === "false" ? false : true;
|
|
1546
1558
|
let launchOptions = { headless: isHeadless };
|
|
1559
|
+
const proxyServer = ctx.env.SMARTUI_HTTPS_PROXY || ctx.env.SMARTUI_HTTP_PROXY || ctx.env.HTTPS_PROXY || ctx.env.HTTP_PROXY;
|
|
1560
|
+
if (proxyServer) {
|
|
1561
|
+
launchOptions.proxy = { server: proxyServer };
|
|
1562
|
+
}
|
|
1547
1563
|
if (ctx.config.web) {
|
|
1548
1564
|
for (const browser of ctx.config.web.browsers) {
|
|
1549
1565
|
switch (browser) {
|
|
@@ -2817,7 +2833,7 @@ var authExec_default = (ctx) => {
|
|
|
2817
2833
|
};
|
|
2818
2834
|
|
|
2819
2835
|
// package.json
|
|
2820
|
-
var version = "4.1.
|
|
2836
|
+
var version = "4.1.51";
|
|
2821
2837
|
var package_default = {
|
|
2822
2838
|
name: "@lambdatest/smartui-cli",
|
|
2823
2839
|
version,
|
|
@@ -2854,12 +2870,12 @@ var package_default = {
|
|
|
2854
2870
|
"@types/which": "^3.0.2",
|
|
2855
2871
|
ajv: "^8.12.0",
|
|
2856
2872
|
"ajv-errors": "^3.0.0",
|
|
2857
|
-
axios: "^1.
|
|
2873
|
+
axios: "^1.12.0",
|
|
2858
2874
|
chalk: "^4.1.2",
|
|
2859
2875
|
commander: "^11.1.0",
|
|
2860
|
-
"cross-spawn": "^7.0.
|
|
2861
|
-
fastify: "^4.
|
|
2862
|
-
"form-data": "^4.0.
|
|
2876
|
+
"cross-spawn": "^7.0.6",
|
|
2877
|
+
fastify: "^4.29.1",
|
|
2878
|
+
"form-data": "^4.0.4",
|
|
2863
2879
|
"json-stringify-safe": "^5.0.1",
|
|
2864
2880
|
listr2: "^7.0.1",
|
|
2865
2881
|
"node-cache": "^5.1.2",
|
|
@@ -5766,6 +5782,9 @@ function verifyFigmaWebConfig(ctx) {
|
|
|
5766
5782
|
if (c.screenshot_names && c.screenshot_names.length > 0 && c.figma_ids && c.figma_ids.length != c.screenshot_names.length) {
|
|
5767
5783
|
throw new Error("Mismatch in Figma Ids and Screenshot Names in figma config");
|
|
5768
5784
|
}
|
|
5785
|
+
if (c.screenshot_viewports && c.screenshot_viewports.length > 0 && c.figma_ids && c.figma_ids.length != c.screenshot_viewports.length) {
|
|
5786
|
+
throw new Error("Mismatch in Figma Ids and Screenshot Viewports in figma config");
|
|
5787
|
+
}
|
|
5769
5788
|
if (isValidArray(c.screenshot_names)) {
|
|
5770
5789
|
for (const name of c.screenshot_names) {
|
|
5771
5790
|
screenshots.push(name);
|
|
@@ -5987,16 +6006,22 @@ function captureScreenshotsForConfig(ctx, browsers, urlConfig, browserName, rend
|
|
|
5987
6006
|
ctx.log.debug(`Failed resolving tunnel/proxy details: ${e}`);
|
|
5988
6007
|
}
|
|
5989
6008
|
let page;
|
|
5990
|
-
if (
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
if (
|
|
5996
|
-
contextOptions.userAgent =
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6009
|
+
if (!ctx.env.DO_NOT_USE_USER_AGENT) {
|
|
6010
|
+
if (browserName == constants_default.CHROME)
|
|
6011
|
+
contextOptions.userAgent = constants_default.CHROME_USER_AGENT;
|
|
6012
|
+
else if (browserName == constants_default.FIREFOX)
|
|
6013
|
+
contextOptions.userAgent = constants_default.FIREFOX_USER_AGENT;
|
|
6014
|
+
else if (browserName == constants_default.SAFARI)
|
|
6015
|
+
contextOptions.userAgent = constants_default.SAFARI_USER_AGENT;
|
|
6016
|
+
else if (browserName == constants_default.EDGE)
|
|
6017
|
+
contextOptions.userAgent = constants_default.EDGE_USER_AGENT;
|
|
6018
|
+
if (ctx.config.userAgent || userAgent) {
|
|
6019
|
+
if (ctx.config.userAgent !== "") {
|
|
6020
|
+
contextOptions.userAgent = ctx.config.userAgent;
|
|
6021
|
+
}
|
|
6022
|
+
if (userAgent && userAgent !== "") {
|
|
6023
|
+
contextOptions.userAgent = userAgent;
|
|
6024
|
+
}
|
|
6000
6025
|
}
|
|
6001
6026
|
}
|
|
6002
6027
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambdatest/smartui-cli",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.51",
|
|
4
4
|
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**/*"
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"@types/which": "^3.0.2",
|
|
29
29
|
"ajv": "^8.12.0",
|
|
30
30
|
"ajv-errors": "^3.0.0",
|
|
31
|
-
"axios": "^1.
|
|
31
|
+
"axios": "^1.12.0",
|
|
32
32
|
"chalk": "^4.1.2",
|
|
33
33
|
"commander": "^11.1.0",
|
|
34
|
-
"cross-spawn": "^7.0.
|
|
35
|
-
"fastify": "^4.
|
|
36
|
-
"form-data": "^4.0.
|
|
34
|
+
"cross-spawn": "^7.0.6",
|
|
35
|
+
"fastify": "^4.29.1",
|
|
36
|
+
"form-data": "^4.0.4",
|
|
37
37
|
"json-stringify-safe": "^5.0.1",
|
|
38
38
|
"listr2": "^7.0.1",
|
|
39
39
|
"node-cache": "^5.1.2",
|