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
1 changed files with 4 additions and 3 deletions

View File

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