🐛 Fix storybook story URL capture and add preview upload#229
Conversation
Code ReviewOverall this is a clean, well-scoped fix. The problem is real (iframe.html URLs don't render in dashboard iframes), the solution is simple, and the test coverage is good. A few notes:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The ?path=/story/... format loads the full Storybook UI with sidebar and controls. The iframe.html URL renders just the isolated component, matching what the screenshot actually captures.
Vizzly - Visual Test ResultsCLI Reporter - 1 change needs review
|

Summary
captureAndSendScreenshotwas sending theiframe.html?id=...URL (what Playwright navigates to) as theurlproperty. This URL doesn't render in iframes on the dashboard. Now converts it to the proper Storybook story path format (?path=/story/...) via a newtoStoryUrl()helper.screenshot.test.jsmocks to use the realiframe.htmlURL (matching whatpage.url()actually returns) and addedstory.idto mock objects. Added tests for the newtoStoryUrlfunction.Test plan
screenshot.test.js— all 11 tests pass