Skip to content

Commit

Permalink
fix diff
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Sep 11, 2024
1 parent 493d12c commit fa42d80
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions packages/mui-material/src/IconButton/IconButton.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,41 +154,41 @@ describe('<IconButton />', () => {
expect(getByTestId('icon-button')).toHaveComputedStyle({ backgroundColor: 'rgba(0, 0, 0, 0)' });
});

it('should disableRipple if set in MuiButtonBase', async () => {
const { container, getByRole } = render(
it('should not throw error for a custom color', () => {
expect(() => (
<ThemeProvider
theme={createTheme({
components: {
MuiButtonBase: {
MuiIconButton: {
defaultProps: {
disableRipple: true,
color: 'custom',
},
},
},
})}
>
<IconButton TouchRippleProps={{ className: 'touch-ripple' }}>book</IconButton>,
</ThemeProvider>,
);
await ripple.startTouch(getByRole('button'));
expect(container.querySelector('.touch-ripple')).to.equal(null);
<IconButton />
</ThemeProvider>
)).not.to.throw();
});

it('should not throw error for a custom color', () => {
expect(() => (
it('should disableRipple if set in MuiButtonBase', async () => {
const { container, getByRole } = render(
<ThemeProvider
theme={createTheme({
components: {
MuiIconButton: {
MuiButtonBase: {
defaultProps: {
color: 'custom',
disableRipple: true,
},
},
},
})}
>
<IconButton />
</ThemeProvider>
)).not.to.throw();
<IconButton TouchRippleProps={{ className: 'touch-ripple' }}>book</IconButton>,
</ThemeProvider>,
);
await ripple.startTouch(getByRole('button'));
expect(container.querySelector('.touch-ripple')).to.equal(null);
});
});

0 comments on commit fa42d80

Please sign in to comment.