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: { htmlString: `

Hello, world!

A link

This should be filtered out:

This also has emoji: 🖤

`, }, argTypes: { extraEmojis: { table: { disable: true, }, }, onElement: { table: { disable: true, }, }, onAttribute: { table: { disable: true, }, }, }, render(args) { return ( // Just for visual clarity in Storybook. ); }, // Force Twemoji to demonstrate emoji rendering. parameters: { state: { meta: { emoji_style: 'twemoji', }, }, }, } 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(); }, };