Open shilman opened 3 years ago
Example from official-storybook https://github.com/storybookjs/storybook/blob/main/examples/official-storybook/stories/addon-storyshots.stories.js
official-storybook
Block.parameters = { async puppeteerTest(page) { const element = await page.$('[data-test-block]'); await element.hover(); const textContent = await element.getProperty('textContent'); const text = await textContent.jsonValue(); // eslint-disable-next-line jest/no-standalone-expect expect(text).toBe('I am hovered'); }, };
Example from
official-storybook
https://github.com/storybookjs/storybook/blob/main/examples/official-storybook/stories/addon-storyshots.stories.js