Ringtone app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

16 lines
473 B

  1. import {render, screen} from '@testing-library/react'
  2. import TextInput from '.'
  3. describe('single-line text input component', () => {
  4. it('should contain a text input element', () => {
  5. render(<TextInput label="" name="" />)
  6. expect(screen.getByRole('textbox')).toBeInTheDocument()
  7. })
  8. it('should acquire a descriptive label', () => {
  9. const label = 'foo'
  10. render(<TextInput label={label} name="" />)
  11. expect(screen.getByLabelText(label)).toBeInTheDocument()
  12. })
  13. })