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
I need to update args from playwright tests without reloading page, because it takes many time.
Passing args through url query params causes page reload.
In storybook v6 I used global variables __STORYBOOK_PREVIEW__, __STORYBOOK_STORY_STORE__ and so on.
But in storybook v7 (with enabled flag storyStoreV7) there are no such global variables any more.
Do I need to write my own addon to public storybook api? For example updateArgs, resetArgs from useArgs().
But in storybook only UI Addons can access hooks useArgs, useStorybookApi, and only from render function.
Calling useArgs, useStorybookApi out of render function of addon causes error in react.js.
But I don't need any UI changes, I just need to access storybook api to update/reset args from playwright.
Please Can someone help or point me in the right direction?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I need to update args from playwright tests without reloading page, because it takes many time.
Passing args through url query params causes page reload.
In storybook v6 I used global variables
__STORYBOOK_PREVIEW__
,__STORYBOOK_STORY_STORE__
and so on.But in storybook v7 (with enabled flag storyStoreV7) there are no such global variables any more.
Do I need to write my own addon to public storybook api? For example
updateArgs
,resetArgs
fromuseArgs()
.But in storybook only UI Addons can access hooks
useArgs
,useStorybookApi
, and only fromrender
function.Calling
useArgs
,useStorybookApi
out ofrender
function of addon causes error in react.js.But I don't need any UI changes, I just need to access storybook api to update/reset args from playwright.
Please Can someone help or point me in the right direction?
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions