Skip to content

Commit e3deefe

Browse files
authored
Merge pull request #180 from parthlambdatest/Dot-4261
add new option loadDomContent
2 parents 3b08256 + 239b91a commit e3deefe

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-cli",
3-
"version": "4.0.12",
3+
"version": "4.0.13",
44
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
55
"files": [
66
"dist/**/*"

src/lib/processSnapshot.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
167167
return false;
168168
}
169169

170+
if (options.loadDomContent) {
171+
processedOptions.loadDomContent = true;
172+
}
173+
170174
if (options.web && Object.keys(options.web).length) {
171175
processedOptions.web = {};
172176

src/lib/schemaValidation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ const SnapshotSchema: JSONSchemaType<Snapshot> = {
351351
},
352352
required: ["devices"],
353353
errorMessage: "Invalid snapshot options; mobile must include devices property."
354+
},
355+
loadDomContent: {
356+
type: "boolean",
357+
errorMessage: "Invalid snapshot options; loadDomContent must be a boolean"
354358
}
355359
},
356360
additionalProperties: false

src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ export interface Snapshot {
103103
devices: string[],
104104
fullPage?: boolean,
105105
orientation?: string
106-
}
106+
},
107+
loadDomContent?: boolean;
107108
}
108109
}
109110

0 commit comments

Comments
 (0)