await userEvent

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-04-01 10:43:58 +02:00
parent 659111711e
commit b1190bf676
36 changed files with 177 additions and 174 deletions
@@ -46,7 +46,7 @@ describe('<ComponentTabs>', () => {
});
});
test('should switch tab on click', () => {
test('should switch tab on click', async () => {
const { getByText } = render(
<ComponentTabs
title="Random Jokes"
@@ -67,7 +67,7 @@ describe('<ComponentTabs>', () => {
display: 'none',
});
userEvent.click(getByText('TabB'));
await userEvent.click(getByText('TabB'));
expect(getByText('ContentA')).toHaveStyle({
display: 'none',