overleaf/services/web/test/frontend/shared/components/processing.test.js
Jessica Lawshe c34d5997e9 Merge pull request #4157 from overleaf/jel-gallery-search-via-algolia
Add gallery search via Algolia

GitOrigin-RevId: 82f306154c990e5ba047b7a7ab9e98f193995ede
2021-06-17 02:09:33 +00:00

17 lines
706 B
JavaScript

import { expect } from 'chai'
import React from 'react'
import { render } from '@testing-library/react'
import Processing from '../../../../frontend/js/shared/components/processing'
describe('<Processing />', function () {
it('renders processing UI when isProcessing is true', function () {
const { container } = render(<Processing isProcessing />)
const element = container.querySelector('i.fa.fa-refresh')
expect(element).to.exist
})
it('does not render processing UI when isProcessing is false', function () {
const { container } = render(<Processing isProcessing={false} />)
const element = container.querySelector('i.fa.fa-refresh')
expect(element).to.not.exist
})
})