Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
durasj committed May 14, 2020
1 parent 25fcf20 commit 534af1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ui/components/FilesArea.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('FilesArea', () => {
</Providers>,
);

expect(() => getByText('Sign a new document')).not.toThrow();
expect(() => getByText('Select your file')).not.toThrow();
expect(() => getByText('Drop your files here')).toThrow();

rerender(
Expand All @@ -33,7 +33,7 @@ describe('FilesArea', () => {
</Providers>,
);

expect(() => getByText('Sign a new document')).toThrow();
expect(() => getByText('Select your file')).toThrow();
expect(() => getByText('Drop your files here')).not.toThrow();
});

Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/MainScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('MainScreen', () => {
// We don't care about it in this test, but it wraps the state update with act
await wait(() => expect(window.OctoSign.set).toHaveBeenCalledWith('image'));

fireEvent.click(getByText('Sign a new document'));
fireEvent.click(getByText('Select your file'));

// TODO: Check if it calls open on the dropzone / change on the file input
});
Expand Down

0 comments on commit 534af1e

Please sign in to comment.