import type { Meta, StoryObj } from '@storybook/react-vite'
import { expect } from 'storybook/test'

import { PageTitle } from './page-title'

const meta = {
  component: PageTitle,
  args: { children: 'Objects' },
  tags: ['ai-generated'],
} satisfies Meta<typeof PageTitle>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {
  play: async ({ canvas }) => {
    await expect(canvas.getByRole('heading', { level: 1, name: 'Objects' })).toBeInTheDocument()
  },
}
