file-view-image.test.jsx 665 B

1234567891011121314151617181920212223
  1. import { screen } from '@testing-library/react'
  2. import { renderWithEditorContext } from '../../../helpers/render-with-context'
  3. import FileViewImage from '../../../../../frontend/js/features/file-view/components/file-view-image'
  4. describe('<FileViewImage />', function () {
  5. const file = {
  6. id: '60097ca20454610027c442a8',
  7. name: 'file.jpg',
  8. hash: 'hash',
  9. linkedFileData: {
  10. source_entity_path: '/source-entity-path',
  11. provider: 'project_file',
  12. },
  13. }
  14. it('renders an image', function () {
  15. renderWithEditorContext(
  16. <FileViewImage file={file} onError={() => {}} onLoad={() => {}} />
  17. )
  18. screen.getByRole('img')
  19. })
  20. })