Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add storybook ci option to test start-storybook ok #3141

Closed
wants to merge 1 commit into from

Conversation

thedavidprice
Copy link
Contributor

@peterp I'm exploring a way to test storybook server start via E2E.

In this PR, I'm trying the start-storybook --smoke-test (Exit after successful start). Strangely, running it works as described, but it throws with a exit code 1 โ€” seems super unhelpful ๐Ÿค”:

...
manager (webpack 5.44.0) compiled successfully in 7939 ms
<i> [webpack-dev-middleware] wait until bundle finished: /__webpack_hmr
99% done plugins webpack-hot-middlewarewebpack built preview e0d515b292be71f5422e in 9331ms
WARN preview: [object Object]
error Command failed with exit code 1.

Just running the start-storybook --ci might be another way if we can check the output for Storybook 6.3.6 started . Here's what that looks like:

...
info => Using cached manager
99% done plugins webpack-hot-middlewarewebpack built preview e0d515b292be71f5422e in 9039ms
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                โ”‚
โ”‚   Storybook 6.3.6 started                      โ”‚
โ”‚   9.71 s for preview                           โ”‚
โ”‚                                                โ”‚
โ”‚    Local:            http://localhost:7910/    โ”‚
โ”‚    On your network:  http://192.0.2.2:7910/    โ”‚
โ”‚                                                โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
99% done plugins webpack-hot-middlewarewebpack built preview 4a36af37a4de190b352d in 784ms

Do you have any other thoughts/suggestions here? Maybe I'm missing something obvious...

@redwoodjs-bot redwoodjs-bot bot added this to New issues in Current-Release-Sprint Jul 28, 2021
@thedavidprice thedavidprice marked this pull request as draft July 28, 2021 18:14
@thedavidprice thedavidprice moved this from New issues to Backlog PRs (can merge anytime / whenever it's ready) in Current-Release-Sprint Jul 28, 2021
@virtuoushub
Copy link
Collaborator

fwiw, my suspicion is that somehow the:

WARN preview: [object Object]

results in the non zero exit code.

I have tried start-storybook --smoke-test in repositories I work on that use Storybook, and which I know start and build Storybook. The console output also also had WARN(s) and resulted in:

error Command failed with exit code 1.

I then tried start-storybook --smoke-test from a fresh project ( using getting started ), no WARN and it completed with an exit code of 0.

@thedavidprice
Copy link
Contributor Author

@virtuoushub Do you want to take over this PR from me? I actually thought that's what you were doing in #3515 No pressure but I'm all for it! Can just close this out.

But also not convinced this is the way to go yet, so understood toward that end as well.

@virtuoushub
Copy link
Collaborator

@virtuoushub Do you want to take over this PR from me? I actually thought that's what you were doing in #3515 No pressure but I'm all for it! Can just close this out.

But also not convinced this is the way to go yet, so understood toward that end as well.

Yes I suggest we move over to #3515

I left my comment here earlier because the output stacktrace is in this PR's description, so I thought it made sense just to close the loop about that closer to the context.

If any relevant findings are more in the future I'll drop them in #3515

@thedavidprice
Copy link
Contributor Author

moved to #3515

Current-Release-Sprint automation moved this from Backlog PRs (merge when ready) to Done Oct 7, 2021
@thedavidprice thedavidprice deleted the dsp-add-storybook-smoketest-option-CI branch November 24, 2021 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants