IIIF-Studio / frontend /src /components /retro /__tests__ /RetroTextarea.test.tsx
Claude
test(frontend): Sprint 5 — Vitest setup, 14 component/API tests, Viewer memo
cf9842a unverified
Raw
History Blame Contribute Delete
481 Bytes
import { render, screen } from '@testing-library/react'
import { RetroTextarea } from '../index'
test('textarea has accessible label', () => {
render(<RetroTextarea label="Notes" />)
expect(screen.getByLabelText('Notes')).toBeInTheDocument()
expect(screen.getByLabelText('Notes').tagName).toBe('TEXTAREA')
})
test('renders without label', () => {
render(<RetroTextarea placeholder="Type here" />)
expect(screen.getByPlaceholderText('Type here')).toBeInTheDocument()
})