Closed jcq closed 1 day ago
@jcq
Thank you for bringing this issue to our attention. I apologize for the delayed response.
I've investigated the problem and confirmed that several files were indeed missing from the dist folder. This oversight has now been addressed through a redeployment of the package.
The missing files, including the preview.js file you mentioned, should now be present in the dist folder. This should resolve the issue you were experiencing with portable stories and the setProjectAnnotations functionality.
I hope this resolves the problem you were facing. If you continue to experience any issues or have any further questions, please don't hesitate to let me know.
Once again, I apologize for the inconvenience caused and thank you for your patience and for reporting this issue. Your feedback helps improve the addon for everyone.
That seems to have fixed it. Thank you for the rapid response!
We are using stories in our automated tests in the manner described by the Storybook team as "portable stories". This entails using the
composeStories
functionality and running the.run()
fn from composed story.In order to make this work correctly, one needs to use the
setProjectAnnotations
functionality: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#1-apply-project-level-annotationsFor addons, one is supposed to import the "preview annotations" and apply those to the test environment so that it works the same as it does through the Storybook GUI:
Best I can tell, the current 4.0 release is missing that export (it looks like there is a
preview.js
file that is supposed to re-export fromdist/preview
, but that file doesn't exist.