Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove act from MiradorMenuButton test. #3979

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions __tests__/src/components/MiradorMenuButton.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { act, render, screen } from 'test-utils';

Check warning on line 1 in __tests__/src/components/MiradorMenuButton.test.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'act' is defined but never used

Check warning on line 1 in __tests__/src/components/MiradorMenuButton.test.js

View workflow job for this annotation

GitHub Actions / build (20.x)

'act' is defined but never used
import userEvent from '@testing-library/user-event';
import { MiradorMenuButton } from '../../../src/components/MiradorMenuButton';

Expand Down Expand Up @@ -37,9 +37,8 @@
const user = userEvent.setup();
createWrapper({ TooltipProps: { placement: 'left-start' } });

await act(async () => {
await user.hover(screen.getByRole('button'));
});
await user.hover(screen.getByRole('button'));

expect(await screen.findByRole('tooltip')).toHaveTextContent('The Label');

expect(screen.getByText('The Label')).toHaveClass('MuiTooltip-tooltipPlacementLeft');
Expand Down
Loading