Skip to content
Open
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.63",
"version": "4.1.69-shri",
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
"files": [
"dist/**/*"
Expand Down
2 changes: 1 addition & 1 deletion src/commander/uploadPdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ command
try {
await tasks.run(ctx);

if (ctx.options.fetchResults) {
if (ctx.options.fetchResults && ctx.build && ctx.build.id) {
startPdfPolling(ctx);
}
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default {
BUILD_RUNNING: 'running',
BUILD_COMPLETE: 'completed',
BUILD_ERROR: 'error',
BUILD_TYPE_OMNI: 'omni',

// CI
GITHUB_API_HOST: 'https://api.github.com',
Expand Down
8 changes: 6 additions & 2 deletions src/lib/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default class httpClient {
if (config && config.data && !config.data.skipLogging && config.data.snapshotUuid && config.method!=='PUT') {
log.debug(config.data);
}

return this.axiosInstance.request(config)
.then(resp => {
if (resp) {
Expand Down Expand Up @@ -258,7 +259,7 @@ export default class httpClient {

getScreenshotData(buildId: string, baseline: boolean, log: Logger, projectToken: string, buildName: string, sessionId?: string, type?: string) {
log.debug(`Fetching screenshot data for buildId: ${buildId} having buildName: ${buildName} with baseline: ${baseline}`);
const params: Record<string, any> = { buildId, baseline, buildName };
const params: Record<string, any> = { buildId, baseline: false, buildName };
if (sessionId) {
params.sessionId = sessionId;
}
Expand Down Expand Up @@ -852,9 +853,12 @@ export default class httpClient {

const auth = Buffer.from(`${this.username}:${this.accessKey}`).toString('base64');

const url = ctx.env.SMARTUI_UPLOAD_URL + '/smartui/2.0/build/screenshots';
ctx.log.debug(`Fetching PDF results from URL: ${url} with params: ${JSON.stringify(params)}`);

try {
const response = await axios.request({
url: ctx.env.SMARTUI_UPLOAD_URL + '/smartui/2.0/build/screenshots',
url: url,
method: 'GET',
params: params,
headers: {
Expand Down
Loading