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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
dist
.idea
pnpm-lock.yaml
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.18",
"version": "4.1.19",
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
"files": [
"dist/**/*"
Expand Down
1 change: 1 addition & 0 deletions src/commander/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ command
.option('-P, --port <number>', 'Port number for the server')
.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')
.action(async function(execCommand, _, command) {
Expand Down
1 change: 1 addition & 0 deletions src/lib/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export default (options: Record<string, string>): Context => {
force: options.force ? true : false,
markBaseline: options.markBaseline ? true : false,
buildName: options.buildName || '',
scheduled: options.scheduled || '',
port: port,
ignoreResolutions: resolutionOff,
fileExtension: extensionFiles,
Expand Down
5 changes: 3 additions & 2 deletions src/lib/httpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default class httpClient {
}
}

createBuild(git: Git, config: any, log: Logger, buildName: string, isStartExec: boolean, smartGit: boolean, markBaseline: boolean, baselineBuild: string) {
createBuild(git: Git, config: any, log: Logger, buildName: string, isStartExec: boolean, smartGit: boolean, markBaseline: boolean, baselineBuild: string, scheduled?: string) {
return this.request({
url: '/build',
method: 'POST',
Expand All @@ -214,7 +214,8 @@ export default class httpClient {
packageVersion: pkgJSON.version,
smartGit,
markBaseline,
baselineBuild
baselineBuild,
scheduled
}
}, log)
}
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/createBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default (ctx: Context): ListrTask<Context, ListrRendererFactory, ListrRen
updateLogContext({task: 'createBuild'});

try {
let resp = await ctx.client.createBuild(ctx.git, ctx.config, ctx.log, ctx.build.name, ctx.isStartExec, ctx.env.SMART_GIT, ctx.options.markBaseline, ctx.options.baselineBuild);
let resp = await ctx.client.createBuild(ctx.git, ctx.config, ctx.log, ctx.build.name, ctx.isStartExec, ctx.env.SMART_GIT, ctx.options.markBaseline, ctx.options.baselineBuild, ctx.options.scheduled);
if (resp && resp.data && resp.data.buildId) {
ctx.build = {
id: resp.data.buildId,
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/createBuildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default (ctx: Context): ListrTask<Context, ListrRendererFactory, ListrRen

try {
if (ctx.authenticatedInitially && !ctx.config.skipBuildCreation) {
let resp = await ctx.client.createBuild(ctx.git, ctx.config, ctx.log, ctx.build.name, ctx.isStartExec, ctx.env.SMART_GIT, ctx.options.markBaseline, ctx.options.baselineBuild);
let resp = await ctx.client.createBuild(ctx.git, ctx.config, ctx.log, ctx.build.name, ctx.isStartExec, ctx.env.SMART_GIT, ctx.options.markBaseline, ctx.options.baselineBuild, ctx.options.scheduled);
if (resp && resp.data && resp.data.buildId) {
ctx.build = {
id: resp.data.buildId,
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface Context {
force?: boolean,
markBaseline?: boolean,
buildName?: string,
scheduled?: string,
port?: number,
ignoreResolutions?: boolean,
fileExtension?: Array<string>,
Expand Down