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.
 
 
 

28 lines
675 B

  1. import {render, screen} from '@testing-library/react'
  2. import OmnisearchForm from '.'
  3. describe('form for searching everything', () => {
  4. beforeEach(() => {
  5. render(
  6. <OmnisearchForm
  7. labels={{
  8. form: 'Search',
  9. query: 'Query',
  10. }}
  11. />
  12. )
  13. })
  14. it('should render a form', () => {
  15. expect(screen.getByRole('form', { name: 'Search' })).toBeInTheDocument()
  16. })
  17. it('should render a textbox for the search query', () => {
  18. expect(screen.getByRole('textbox', { name: 'Query' })).toBeInTheDocument()
  19. })
  20. it('should render a button for submitting the search query', () => {
  21. expect(screen.getByRole('button', { name: 'Search' })).toBeInTheDocument()
  22. })
  23. })