Hooks state bug in Vue2

This commit is contained in:
Michael Shilman 2022-10-02 18:00:32 +08:00
parent d7d91a1d46
commit 0814a13d82

View File

@ -24,6 +24,8 @@ export const UseState = {
],
play: async ({ canvasElement }: PlayFunctionContext) => {
const button = await within(canvasElement).findByText('Clicked 0 times');
// FIXME: hooks state does not trigger a re-render in vue2
if (globalThis.storybookRenderer === 'vue') return;
await userEvent.click(button);
await within(canvasElement).findByText('Clicked 1 times');