processing.test.js 706 B

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