import type { Meta, StoryObj } from '@storybook/react-vite'; import { expect } from 'storybook/test'; import { HTMLBlock } from './index'; const meta = { title: 'Components/HTMLBlock', component: HTMLBlock, args: { contents: '

Hello, world!

\n

A link

\n

This should be filtered out:

', }, render(args) { return ( // Just for visual clarity in Storybook.
); }, } satisfies Meta; export default meta; type Story = StoryObj; export const Default: Story = { async play({ canvas }) { const link = canvas.queryByRole('link'); await expect(link).toBeInTheDocument(); const button = canvas.queryByRole('button'); await expect(button).not.toBeInTheDocument(); }, };