Skip to content

Commit 9bcf973

Browse files
authored
Merge pull request #41 from LambdaTest/stage
Release 1.1.7
2 parents 1fa4b59 + e60693f commit 9bcf973

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

commands/storybook.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ async function storybook(serve, options) {
114114
storybookConfig: {
115115
browsers: browsers,
116116
resolutions: resolutions,
117-
storyIds: storyIds
117+
storyIds: storyIds,
118+
waitForTimeout: storybookConfig.waitForTimeout
118119
},
119120
git: {
120121
branch: commit.branch,

commands/utils/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const defaultSmartUIConfig = {
88
resolutions: [
99
[1920, 1080]
1010
],
11+
waitForTimeout: 0,
1112
include: [],
1213
exclude: []
1314
}

commands/utils/validate.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@ function validateConfig(configFile) {
142142
}
143143
});
144144

145+
// Sanity check waitForTimeout
146+
if (!Object.hasOwn(storybookConfig, 'waitForTimeout')) {
147+
storybookConfig.waitForTimeout = 0;
148+
} else if (storybookConfig.waitForTimeout <= 0 || storybookConfig.waitForTimeout > 30000) {
149+
console.log('[smartui] Warning: Invalid config, value of waitForTimeout must be > 0 and <= 30000');
150+
console.log('If you do not wish to include waitForTimeout parameter, remove it from the config file.');
151+
storybookConfig.waitForTimeout = 0;
152+
}
153+
145154
return storybookConfig
146155
}
147156

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ program.command('storybook')
3636
.option('--force-rebuild', 'Force a rebuild of an already existing build.', false)
3737
.action(async function(serve, options) {
3838
options.env = program.opts().env || 'prod';
39-
if (options.config) {
40-
options.config = validateConfig(options.config);
41-
}
42-
39+
4340
console.log('SmartUI Storybook CLI v' + version);
4441
await checkUpdate(version, options);
4542
console.log('\n');
4643

44+
if (options.config) {
45+
options.config = validateConfig(options.config);
46+
}
47+
4748
await validateProjectToken(options);
4849
if (!options.forceRebuild) await validateLatestBuild(options);
4950
storybook(serve, options);

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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-storybook",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"description": "LambdaTest's command-line interface (CLI) aimed to help you run your SmartUI tests on LambdaTest platform",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)