@lambdatest/smartui-cli 4.1.5 → 4.1.6

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.
Files changed (2) hide show
  1. package/dist/index.cjs +12 -3
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -677,6 +677,11 @@ var WebStaticConfigSchema = {
677
677
  type: "string"
678
678
  }
679
679
  }
680
+ },
681
+ pageEvent: {
682
+ type: "string",
683
+ enum: ["load", "domcontentloaded"],
684
+ errorMessage: "pageEvent can be load, domcontentloaded"
680
685
  }
681
686
  },
682
687
  required: ["name", "url"],
@@ -1525,7 +1530,7 @@ var authExec_default = (ctx) => {
1525
1530
  };
1526
1531
 
1527
1532
  // package.json
1528
- var version = "4.1.5";
1533
+ var version = "4.1.6";
1529
1534
  var package_default = {
1530
1535
  name: "@lambdatest/smartui-cli",
1531
1536
  version,
@@ -2836,6 +2841,8 @@ function processSnapshot(snapshot, ctx) {
2836
2841
  }
2837
2842
  }
2838
2843
  }
2844
+ processedOptions.ignoreDOM = options == null ? void 0 : options.ignoreDOM;
2845
+ processedOptions.selectDOM = options == null ? void 0 : options.selectDOM;
2839
2846
  ctx.log.debug(`Processed options: ${JSON.stringify(processedOptions)}`);
2840
2847
  }
2841
2848
  let hasBrowserErrors = false;
@@ -3437,10 +3444,12 @@ var createBuild_default = (ctx) => {
3437
3444
  function captureScreenshotsForConfig(ctx, browsers, urlConfig, browserName, renderViewports) {
3438
3445
  return __async(this, null, function* () {
3439
3446
  ctx.log.debug(`*** urlConfig ${JSON.stringify(urlConfig)}`);
3440
- let { name, url, waitForTimeout, execute } = urlConfig;
3447
+ let { name, url, waitForTimeout, execute, pageEvent } = urlConfig;
3441
3448
  let afterNavigationScript = execute == null ? void 0 : execute.afterNavigation;
3442
3449
  let beforeSnapshotScript = execute == null ? void 0 : execute.beforeSnapshot;
3443
- let pageOptions = { waitUntil: process.env.SMARTUI_PAGE_WAIT_UNTIL_EVENT || "load", timeout: ctx.config.waitForPageRender || constants_default.DEFAULT_PAGE_LOAD_TIMEOUT };
3450
+ let waitUntilEvent = pageEvent || process.env.SMARTUI_PAGE_WAIT_UNTIL_EVENT || "load";
3451
+ let pageOptions = { waitUntil: waitUntilEvent, timeout: ctx.config.waitForPageRender || constants_default.DEFAULT_PAGE_LOAD_TIMEOUT };
3452
+ ctx.log.debug(`url: ${url} pageOptions: ${JSON.stringify(pageOptions)}`);
3444
3453
  let ssId = name.toLowerCase().replace(/\s/g, "_");
3445
3454
  let context;
3446
3455
  let contextOptions = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdatest/smartui-cli",
3
- "version": "4.1.5",
3
+ "version": "4.1.6",
4
4
  "description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
5
5
  "files": [
6
6
  "dist/**/*"