Skip to content

Commit

Permalink
Merge pull request #3885 from WiXSL/patch-test-await-missing
Browse files Browse the repository at this point in the history
Missing await for async operation in test.
  • Loading branch information
djhi authored Oct 27, 2019
2 parents 731d860 + 4905eb1 commit e9b1943
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('<AutocompleteArrayInput />', () => {
expect(queryAllByRole('option')).toHaveLength(0);

fireEvent.change(input, { target: { value: 'Tec' } });
waitForDomChange();
await waitForDomChange();
expect(queryAllByRole('option')).toHaveLength(1);
});

Expand Down
4 changes: 3 additions & 1 deletion packages/ra-ui-materialui/src/input/InputHelperText.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ describe('InputHelperText', () => {
afterEach(cleanup);

it('does not render anything when the input has not been touched yet and has no helper text', () => {
const { container } = render(<InputHelperText error="Crap!" />);
const { container } = render(
<InputHelperText touched={false} error="Crap!" />
);
expect(container.innerHTML).toBe('');
});

Expand Down

0 comments on commit e9b1943

Please sign in to comment.