Skip to content

Commit 1b1e687

Browse files
authored
Merge pull request #411 from LambdaTest/stage
Release 4.1.39
2 parents 7f43281 + 520082e commit 1b1e687

File tree

3 files changed

+10
-3
lines changed

3 files changed

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

src/lib/httpClient.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,13 @@ export default class httpClient {
681681

682682
getSnapshotStatus(buildId: string, snapshotName: string, snapshotUuid: string, ctx: Context): Promise<Record<string, any>> {
683683
return this.request({
684-
url: `/snapshot/status?buildId=${buildId}&snapshotName=${snapshotName}&snapshotUUID=${snapshotUuid}`,
684+
url: `/snapshot/status`,
685685
method: 'GET',
686+
params: {
687+
buildId,
688+
snapshotName,
689+
snapshotUUID: snapshotUuid
690+
},
686691
headers: {
687692
'Content-Type': 'application/json',
688693
}

src/lib/server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,12 @@ export default async (ctx: Context): Promise<FastifyInstance<Server, IncomingMes
241241

242242
try {
243243
ctx.log.debug(`request.query : ${JSON.stringify(request.query)}`);
244-
const { contextId, pollTimeout, snapshotName } = request.query as { contextId: string, pollTimeout: number, snapshotName: string };
244+
const { contextId, pollTimeout, snapshotName: rawSnapshotName } = request.query as { contextId: string, pollTimeout: number, snapshotName: string };
245+
const snapshotName = rawSnapshotName?.trim();
245246
if (!contextId || !snapshotName) {
246247
throw new Error('contextId and snapshotName are required parameters');
247248
}
249+
248250

249251
const timeoutDuration = pollTimeout*1000 || 30000;
250252

0 commit comments

Comments
 (0)