Skip to content
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lambdatest/smartui-cli",
"version": "4.1.7-beta.5",
"version": "4.1.9",
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
"files": [
"dist/**/*"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default (options: Record<string, string>): Context => {
skipBuildCreation: config.skipBuildCreation ?? false,
tunnel: config.tunnel ?? false,
tunnelName: config.tunnelName || '',
userAgent: config.userAgent || '',
userAgent: config.userAgent || ''
},
uploadFilePath: '',
webStaticConfig: [],
Expand Down
4 changes: 1 addition & 3 deletions src/lib/processSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
ctx.log.debug(`Resource had a disallowed status for retry as well ${requestUrl} disallowed status [${responseOfRetry.status()}]`);
if (responseOfRetry && responseOfRetry.headers()) {
const responseHeadersRetry = responseOfRetry.headers();
ctx.log.debug(`Response headers for ${requestUrl}: ${JSON.stringify(responseHeadersRetry, null, 2)}`);
ctx.log.debug(`Response headers for retry ${requestUrl}: ${JSON.stringify(responseHeadersRetry, null, 2)}`);
}

let data = {
Expand All @@ -203,8 +203,6 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
discoveryErrors.browsers[globalBrowser][globalViewport]?.push(data);
}
}


} else {
ctx.log.debug(`Handling request ${requestUrl}\n - content-type ${response.headers()['content-type']}`);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/schemaValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const ConfigSchema = {
},
userAgent: {
type: "string",
errorMessage: "Invalid config; userAgent must be string"
errorMessage: "User Agent value must be a valid string"
},
},
anyOf: [
Expand Down
2 changes: 1 addition & 1 deletion src/lib/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function captureScreenshotsForConfig(
if(ctx.config.userAgent !== ""){
contextOptions.userAgent = ctx.config.userAgent;
}
if (urlConfig.userAgent !== "" && urlConfig.userAgent !== undefined) {
if (userAgent && userAgent !== "") {
contextOptions.userAgent = userAgent;
}
}
Expand Down