test: Fix act errors in LanguagePicker test (#21395)

This commit is contained in:
Lyndsi Kay Williams 2022-09-09 05:43:08 -05:00 committed by GitHub
parent ac7dcc3a8d
commit a2ea5efe25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,22 +38,23 @@ const mockedProps = {
}, },
}; };
test('should render', () => { test('should render', async () => {
const { container } = render( const { container } = render(
<Menu> <Menu>
<LanguagePicker {...mockedProps} /> <LanguagePicker {...mockedProps} />
</Menu>, </Menu>,
); );
expect(await screen.findByRole('button')).toBeInTheDocument();
expect(container).toBeInTheDocument(); expect(container).toBeInTheDocument();
}); });
test('should render the language picker', () => { test('should render the language picker', async () => {
render( render(
<Menu> <Menu>
<LanguagePicker {...mockedProps} /> <LanguagePicker {...mockedProps} />
</Menu>, </Menu>,
); );
expect(screen.getByLabelText('Languages')).toBeInTheDocument(); expect(await screen.findByLabelText('Languages')).toBeInTheDocument();
}); });
test('should render the items', async () => { test('should render the items', async () => {