-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a91e7e6
commit 0b8f9e7
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import FileDropZone from './FileDropZone'; | ||
|
||
describe('FileDropZone', () => { | ||
it('should render file drop zone', () => { | ||
const { container } = render(<FileDropZone onFileDrop={jest.fn()} />); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
it('should render children', () => { | ||
render(<FileDropZone onFileDrop={jest.fn()}>Hi</FileDropZone>); | ||
expect(screen.getByText('Hi')).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
packages/module/src/FileDropZone/__snapshots__/FileDropZone.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`FileDropZone should render file drop zone 1`] = ` | ||
<div> | ||
<div | ||
class="pf-v6-c-multiple-file-upload pf-chatbot__dropzone pf-chatbot__dropzone--default pf-chatbot__dropzone--invisible " | ||
role="presentation" | ||
tabindex="0" | ||
> | ||
<input | ||
multiple="" | ||
style="display: none;" | ||
tabindex="-1" | ||
type="file" | ||
/> | ||
</div> | ||
</div> | ||
`; |