Skip to content

Commit 220aa1c

Browse files
Merge pull request #280 from LambdaTest/prod
Prod
2 parents e726054 + 771ed4d commit 220aa1c

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
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.1.7-beta.5",
3+
"version": "4.1.9",
44
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
55
"files": [
66
"dist/**/*"

src/lib/ctx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default (options: Record<string, string>): Context => {
102102
skipBuildCreation: config.skipBuildCreation ?? false,
103103
tunnel: config.tunnel ?? false,
104104
tunnelName: config.tunnelName || '',
105-
userAgent: config.userAgent || '',
105+
userAgent: config.userAgent || ''
106106
},
107107
uploadFilePath: '',
108108
webStaticConfig: [],

src/lib/processSnapshot.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
180180
ctx.log.debug(`Resource had a disallowed status for retry as well ${requestUrl} disallowed status [${responseOfRetry.status()}]`);
181181
if (responseOfRetry && responseOfRetry.headers()) {
182182
const responseHeadersRetry = responseOfRetry.headers();
183-
ctx.log.debug(`Response headers for ${requestUrl}: ${JSON.stringify(responseHeadersRetry, null, 2)}`);
183+
ctx.log.debug(`Response headers for retry ${requestUrl}: ${JSON.stringify(responseHeadersRetry, null, 2)}`);
184184
}
185185

186186
let data = {
@@ -203,8 +203,6 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
203203
discoveryErrors.browsers[globalBrowser][globalViewport]?.push(data);
204204
}
205205
}
206-
207-
208206
} else {
209207
ctx.log.debug(`Handling request ${requestUrl}\n - content-type ${response.headers()['content-type']}`);
210208

src/lib/schemaValidation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ const ConfigSchema = {
198198
},
199199
userAgent: {
200200
type: "string",
201-
errorMessage: "Invalid config; userAgent must be string"
201+
errorMessage: "User Agent value must be a valid string"
202202
},
203203
},
204204
anyOf: [

src/lib/screenshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function captureScreenshotsForConfig(
3535
if(ctx.config.userAgent !== ""){
3636
contextOptions.userAgent = ctx.config.userAgent;
3737
}
38-
if (urlConfig.userAgent !== "" && urlConfig.userAgent !== undefined) {
38+
if (userAgent && userAgent !== "") {
3939
contextOptions.userAgent = userAgent;
4040
}
4141
}

0 commit comments

Comments
 (0)