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

[IconButton] Fix hover background color behavior #43271

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
skip browser tests
  • Loading branch information
mnajdova committed Aug 12, 2024
commit 0c6c28eb99d601d96d2e54865456ef1c67c021d9
10 changes: 9 additions & 1 deletion packages/mui-material/src/IconButton/IconButton.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ describe('<IconButton />', () => {
)).not.to.throw();
});

it('should apply the hover background by default', () => {
it('should apply the hover background by default', function test() {
if(!/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}

const { container, getByTestId } = render(<IconButton data-testid="icon-button" />);

fireEvent.mouseMove(container.firstChild, {
Expand All @@ -154,6 +158,10 @@ describe('<IconButton />', () => {
});

it('should not apply the hover background if disableRipple is true', () => {
if(!/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}

const { container, getByTestId } = render(
<IconButton disableRipple data-testid="icon-button" />,
);
Expand Down