mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
3dfcb95802
[BinaryFile] Reopening of Binary file React migration GitOrigin-RevId: 050e66e3321bd6579d44932b669fc0a31df06d18
27 lines
662 B
JavaScript
27 lines
662 B
JavaScript
import React from 'react'
|
|
import { render, screen } from '@testing-library/react'
|
|
|
|
import BinaryFileImage from '../../../../../frontend/js/features/binary-file/components/binary-file-image.js'
|
|
|
|
describe('<BinaryFileImage />', function () {
|
|
const file = {
|
|
id: '60097ca20454610027c442a8',
|
|
name: 'file.jpg',
|
|
linkedFileData: {
|
|
source_entity_path: '/source-entity-path',
|
|
provider: 'project_file',
|
|
},
|
|
}
|
|
|
|
it('renders an image', function () {
|
|
render(
|
|
<BinaryFileImage
|
|
fileName={file.name}
|
|
fileId={file.id}
|
|
onError={() => {}}
|
|
onLoad={() => {}}
|
|
/>
|
|
)
|
|
screen.getByRole('img')
|
|
})
|
|
})
|