You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{getStoryContext}from"@storybook/test-runner"// in postVisitconststoryContext=awaitgetStoryContext(page,context)storyContext.canvasElement// type unknown should be HTMLElement
Note that in both preVisit and postVisit the value of canvasElement is undefined at runtime.
Not sure if that is intentional or it's a bug. In either way the type and runtime doesn't match.
which is a core Storybook API, that resolves to something like this:
So I can see that it doesn't match StoryContext, but rather StoryContextForEnhancers. I'll make a fix for it! But keep in mind that this is mostly a Typescript fix, making the type more true to the actual return values, rather than having canvasElement available. In fact, even if canvasElement was available, you wouldn't be able to get it fully, as it's transported from Browser to Node by Playwright, and it would essentially give you something like { canvasElement: 'ref: <Node>' } rather than an actual DOM element.
Describe the bug
This is caused by:
To Reproduce
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: