@lambdatest/smartui-cli 4.1.30 → 4.1.31

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 +39 -2
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -779,6 +779,14 @@ var ConfigSchema = {
779
779
  useLambdaInternal: {
780
780
  type: "boolean",
781
781
  errorMessage: "Invalid config; useLambdaInternal must be true/false"
782
+ },
783
+ useExtendedViewport: {
784
+ type: "boolean",
785
+ errorMessage: "Invalid config; useExtendedViewport must be true/false"
786
+ },
787
+ loadDomContent: {
788
+ type: "boolean",
789
+ errorMessage: "Invalid config; loadDomContent must be true/false"
782
790
  }
783
791
  },
784
792
  anyOf: [
@@ -1036,6 +1044,10 @@ var SnapshotSchema = {
1036
1044
  timeout: {
1037
1045
  type: "number",
1038
1046
  errorMessage: "Invalid snapshot options; timeout must be a number"
1047
+ },
1048
+ useExtendedViewport: {
1049
+ type: "boolean",
1050
+ errorMessage: "Invalid snapshot options; useExtendedViewport must be a boolean"
1039
1051
  }
1040
1052
  },
1041
1053
  additionalProperties: false
@@ -2283,7 +2295,7 @@ var authExec_default = (ctx) => {
2283
2295
  };
2284
2296
 
2285
2297
  // package.json
2286
- var version = "4.1.30";
2298
+ var version = "4.1.31";
2287
2299
  var package_default = {
2288
2300
  name: "@lambdatest/smartui-cli",
2289
2301
  version,
@@ -3011,6 +3023,8 @@ var ctx_default = (options) => {
3011
3023
  let buildNameObj;
3012
3024
  let allowDuplicateSnapshotNames = false;
3013
3025
  let useLambdaInternal = false;
3026
+ let useExtendedViewport = false;
3027
+ let loadDomContent = false;
3014
3028
  try {
3015
3029
  if (options.config) {
3016
3030
  config = JSON.parse(fs5__default.default.readFileSync(options.config, "utf-8"));
@@ -3078,6 +3092,12 @@ var ctx_default = (options) => {
3078
3092
  if (config.useLambdaInternal) {
3079
3093
  useLambdaInternal = true;
3080
3094
  }
3095
+ if (config.useExtendedViewport) {
3096
+ useExtendedViewport = true;
3097
+ }
3098
+ if (config.loadDomContent) {
3099
+ loadDomContent = true;
3100
+ }
3081
3101
  if (config.waitForPageRender && config.waitForPageRender < 3e4) {
3082
3102
  config.waitForPageRender = 3e4;
3083
3103
  }
@@ -3106,7 +3126,9 @@ var ctx_default = (options) => {
3106
3126
  userAgent: config.userAgent || "",
3107
3127
  requestHeaders: config.requestHeaders || {},
3108
3128
  allowDuplicateSnapshotNames,
3109
- useLambdaInternal
3129
+ useLambdaInternal,
3130
+ useExtendedViewport,
3131
+ loadDomContent
3110
3132
  },
3111
3133
  uploadFilePath: "",
3112
3134
  webStaticConfig: [],
@@ -3572,6 +3594,9 @@ function prepareSnapshot(snapshot, ctx) {
3572
3594
  if (options.loadDomContent) {
3573
3595
  processedOptions.loadDomContent = true;
3574
3596
  }
3597
+ if (options.useExtendedViewport) {
3598
+ processedOptions.useExtendedViewport = true;
3599
+ }
3575
3600
  if (options.sessionId) {
3576
3601
  const sessionId = options.sessionId;
3577
3602
  processedOptions.sessionId = sessionId;
@@ -3657,6 +3682,12 @@ function prepareSnapshot(snapshot, ctx) {
3657
3682
  ctx.log.debug(`Tunnel address added to processedOptions: ${tunnelAddress}`);
3658
3683
  }
3659
3684
  }
3685
+ if (ctx.config.loadDomContent) {
3686
+ processedOptions.loadDomContent = true;
3687
+ }
3688
+ if (ctx.config.useExtendedViewport) {
3689
+ processedOptions.useExtendedViewport = true;
3690
+ }
3660
3691
  processedOptions.allowedAssets = ctx.config.allowedAssets;
3661
3692
  processedOptions.selectors = selectors;
3662
3693
  processedOptions.ignoreDOM = options == null ? void 0 : options.ignoreDOM;
@@ -4002,6 +4033,12 @@ function processSnapshot(snapshot, ctx) {
4002
4033
  ctx.log.debug(`Tunnel address added to processedOptions: ${tunnelAddress}`);
4003
4034
  }
4004
4035
  }
4036
+ if (ctx.config.loadDomContent) {
4037
+ processedOptions.loadDomContent = true;
4038
+ }
4039
+ if (ctx.config.useExtendedViewport) {
4040
+ processedOptions.useExtendedViewport = true;
4041
+ }
4005
4042
  let navigated = false;
4006
4043
  let previousDeviceType = null;
4007
4044
  let renderViewports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdatest/smartui-cli",
3
- "version": "4.1.30",
3
+ "version": "4.1.31",
4
4
  "description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
5
5
  "files": [
6
6
  "dist/**/*"