processing.test.jsx 680 B

12345678910111213141516
  1. import { expect } from 'chai'
  2. import { render } from '@testing-library/react'
  3. import Processing from '../../../../frontend/js/shared/components/processing'
  4. describe('<Processing />', function () {
  5. it('renders processing UI when isProcessing is true', function () {
  6. const { container } = render(<Processing isProcessing />)
  7. const element = container.querySelector('i.fa.fa-refresh')
  8. expect(element).to.exist
  9. })
  10. it('does not render processing UI when isProcessing is false', function () {
  11. const { container } = render(<Processing isProcessing={false} />)
  12. const element = container.querySelector('i.fa.fa-refresh')
  13. expect(element).to.not.exist
  14. })
  15. })