import type { Meta, StoryObj } from '@storybook/react'; import { within, userEvent } from 'storybook/test'; import { action } from 'storybook/actions'; import React from 'react'; import { Button } from '../../Button'; import { Popover } from '../Popover'; import { Select } from '../../Select'; const meta: Meta = { title: 'Navigation/Popover', component: Popover, parameters: { layout: 'centered', chromatic: { disableSnapshot: false }, }, }; export default meta; type Story = StoryObj; export const Default: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); const openButton = canvas.getByRole('button', { name: 'Show me a dropdown', }); await userEvent.click(openButton); }, render: (args) => ( { return (