Skip to content

Instantly share code, notes, and snippets.

@ludicast
Created January 10, 2023 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ludicast/e287ee6b0e3c05aac6afb7636cc73d66 to your computer and use it in GitHub Desktop.
Save ludicast/e287ee6b0e3c05aac6afb7636cc73d66 to your computer and use it in GitHub Desktop.
<Story
name="Filled Form"
play={ async ({ canvasElement }) => {
const canvas = within(canvasElement);
await userEvent.type(canvas.getByTestId('email'), 'email@provider.com');
await userEvent.click(canvas.getByRole('button'));
await expect(
canvas.getByText(
'Everything is perfect. Your account is ready and we should probably get you started!'
)
).toBeInTheDocument();
}}>
{Template.bind({})}
</Story>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment