21 lines
634 B
TypeScript
21 lines
634 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
import { expect } from 'storybook/test'
|
|
|
|
import { ThemeSwitch } from './theme-switch'
|
|
|
|
const meta = {
|
|
component: ThemeSwitch,
|
|
tags: ['ai-generated'],
|
|
} satisfies Meta<typeof ThemeSwitch>
|
|
|
|
export default meta
|
|
type Story = StoryObj<typeof meta>
|
|
|
|
export const Default: Story = {
|
|
play: async ({ canvas }) => {
|
|
await expect(canvas.getByRole('button', { name: /light/i })).toBeInTheDocument()
|
|
await expect(canvas.getByRole('button', { name: /dark/i })).toBeInTheDocument()
|
|
await expect(canvas.getByRole('button', { name: /system/i })).toBeInTheDocument()
|
|
},
|
|
}
|