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

Storywright fails when storyStoreV7 is enabled #68

Open
dmytrokirpa opened this issue Jul 25, 2024 · 0 comments
Open

Storywright fails when storyStoreV7 is enabled #68

dmytrokirpa opened this issue Jul 25, 2024 · 0 comments

Comments

@dmytrokirpa
Copy link

Steps to Reproduce:

  1. Set up a project using Storybook 7 or higher with the default configuration.
  2. Create a story utilizing the StoryWright decorator.
  3. Build the Storybook.
  4. Execute StoryWright.

Actual Result:

StoryWright fails, producing the following output:

$ storywright  --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true
================ StoryWright params =================
Storybook url = file:////.../dist/storybook
Screenshot destination path = dist/screenshots
Browsers = chromium
Headless = true
Concurrency = 4
Cores available on system  = 16
SkipSteps = false
WaitTimeScreenshot = 500
Parse DOM = false
Compress DOM = false
================ Starting story right execution =================
StoryWright processor started @  2024-07-25T13:04:40.569Z
Starting browser test for chromium
** ERROR ** Error: page.evaluate: Error: extract called before initialization
    at StoryStore.extract (file:///.../dist/storybook/sb-preview/runtime.js:47:11685)
    at StoryStore.raw (file:///.../dist/storybook/sb-preview/runtime.js:47:13415)
    at ClientApi.raw (file:///.../dist/storybook/sb-preview/runtime.js:79:408)
    at eval (eval at evaluate (:226:30), <anonymous>:1:28)
    at eval (<anonymous>)
    at UtilityScript.evaluate (<anonymous>:226:30)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Closing process !!
StoryWright took  0 secs to complete.
StoryWright processor completed @  2024-07-25T13:04:40.959Z

Opting out of on-demand story loading somewhat works, although it is not a default setting and it's not documented in StoryWright documentation.

Expected Result

StoryWright should successfully capture screenshots for stories using a standard Storybook v7+ configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant