Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.42",
"version": "4.1.43",
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
"files": [
"dist/**/*"
Expand Down
2 changes: 2 additions & 0 deletions src/commander/commander.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ program
.option('--baselineBranch <string>', 'Mark this build baseline')
.option('--baselineBuild <string>', 'Mark this build baseline')
.option('--githubURL <string>', 'GitHub URL including commitId')
.option('--userName <string>', 'Specify the LT username')
.option('--accessKey <string>', 'Specify the LT accesskey')
.addCommand(exec)
.addCommand(capture)
.addCommand(configWeb)
Expand Down
2 changes: 0 additions & 2 deletions src/commander/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ command
.option('--fetch-results [filename]', 'Fetch results and optionally specify an output file, e.g., <filename>.json')
.option('--buildName <string>', 'Specify the build name')
.option('--scheduled <string>', 'Specify the schedule ID')
.option('--userName <string>', 'Specify the LT username')
.option('--accessKey <string>', 'Specify the LT accesskey')
.option('--show-render-errors', 'Show render errors from SmartUI build')
.action(async function(execCommand, _, command) {
const options = command.optsWithGlobals();
Expand Down
4 changes: 3 additions & 1 deletion src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default (): Env => {
SHOW_RENDER_ERRORS,
SMARTUI_SSE_URL='https://server-events.lambdatest.com',
LT_SDK_SKIP_EXECUTION_LOGS,
MAX_CONCURRENT_PROCESSING
MAX_CONCURRENT_PROCESSING,
DO_NOT_USE_USER_AGENT,
} = process.env

return {
Expand Down Expand Up @@ -55,5 +56,6 @@ export default (): Env => {
SMARTUI_SSE_URL,
LT_SDK_SKIP_EXECUTION_LOGS: LT_SDK_SKIP_EXECUTION_LOGS === 'true',
MAX_CONCURRENT_PROCESSING: MAX_CONCURRENT_PROCESSING ? parseInt(MAX_CONCURRENT_PROCESSING, 10) : 0,
DO_NOT_USE_USER_AGENT: DO_NOT_USE_USER_AGENT === 'true',
}
}
7 changes: 5 additions & 2 deletions src/lib/processSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,11 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
}
let contextOptions: Record<string, any> = {
javaScriptEnabled: ctx.config.cliEnableJavaScript,
userAgent: constants.CHROME_USER_AGENT,
ignoreHTTPSErrors : ctx.config.ignoreHTTPSErrors
ignoreHTTPSErrors: ctx.config.ignoreHTTPSErrors,
};

if (!ctx.env.DO_NOT_USE_USER_AGENT) {
contextOptions.userAgent = constants.CHROME_USER_AGENT;
}
if (!ctx.browser?.isConnected()) {
if (ctx.env.HTTP_PROXY || ctx.env.HTTPS_PROXY) launchOptions.proxy = { server: ctx.env.HTTP_PROXY || ctx.env.HTTPS_PROXY };
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export interface Env {
SMARTUI_SSE_URL: string;
LT_SDK_SKIP_EXECUTION_LOGS: boolean;
MAX_CONCURRENT_PROCESSING: number;
DO_NOT_USE_USER_AGENT: boolean;
}

export interface Snapshot {
Expand Down