Skip to content

Commit

Permalink
Merge pull request #171 from LambdaTest/stage
Browse files Browse the repository at this point in the history
add support of SMARTUI_HTTP_PROXY keys
  • Loading branch information
parthlambdatest authored Nov 14, 2024
2 parents 27e0bd1 + 7bbcbc2 commit 95a90c3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
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.0.9",
"version": "4.0.10",
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
"files": [
"dist/**/*"
Expand Down
4 changes: 4 additions & 0 deletions src/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export default (): Env => {
SMARTUI_DO_NOT_USE_CAPTURED_COOKIES,
HTTP_PROXY,
HTTPS_PROXY,
SMARTUI_HTTP_PROXY,
SMARTUI_HTTPS_PROXY,
GITHUB_ACTIONS,
FIGMA_TOKEN,
LT_USERNAME,
Expand All @@ -23,6 +25,8 @@ export default (): Env => {
SMARTUI_GIT_INFO_FILEPATH,
HTTP_PROXY,
HTTPS_PROXY,
SMARTUI_HTTP_PROXY,
SMARTUI_HTTPS_PROXY,
GITHUB_ACTIONS,
FIGMA_TOKEN,
LT_USERNAME,
Expand Down
1 change: 1 addition & 0 deletions src/lib/processSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
}
if (!ctx.browser?.isConnected()) {
if (ctx.env.HTTP_PROXY || ctx.env.HTTPS_PROXY) launchOptions.proxy = { server: ctx.env.HTTP_PROXY || ctx.env.HTTPS_PROXY };
if (ctx.env.SMARTUI_HTTP_PROXY || ctx.env.SMARTUI_HTTPS_PROXY) launchOptions.proxy = { server: ctx.env.SMARTUI_HTTP_PROXY || ctx.env.SMARTUI_HTTPS_PROXY };
ctx.browser = await chromium.launch(launchOptions);
ctx.log.debug(`Chromium launched with options ${JSON.stringify(launchOptions)}`);
}
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export interface Env {
SMARTUI_GIT_INFO_FILEPATH: string | undefined;
HTTP_PROXY: string | undefined;
HTTPS_PROXY: string | undefined;
SMARTUI_HTTP_PROXY: string | undefined;
SMARTUI_HTTPS_PROXY: string | undefined;
GITHUB_ACTIONS: string | undefined;
FIGMA_TOKEN: string | undefined;
LT_USERNAME : string | undefined;
Expand Down

0 comments on commit 95a90c3

Please sign in to comment.