Skip to content

Commit 3358ac7

Browse files
committed
add test
1 parent 0c62fa1 commit 3358ac7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/mui-material/src/SnackbarContent/SnackbarContent.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,20 @@ describe('<SnackbarContent />', () => {
5959
expect(queryByRole('alertdialog')).to.have.text('alertdialog message');
6060
});
6161
});
62+
63+
describe('prop: square', () => {
64+
it('should disable the rounded class when square is true', () => {
65+
const { getByTestId } = render(
66+
<SnackbarContent data-testid="snackbar" message="test" square />,
67+
);
68+
69+
expect(getByTestId('snackbar')).not.to.have.class('MuiPaper-rounded');
70+
});
71+
72+
it('should apply the rounded class when square is not passed', () => {
73+
const { getByTestId } = render(<SnackbarContent data-testid="snackbar" message="test" />);
74+
75+
expect(getByTestId('snackbar')).to.have.class('MuiPaper-rounded');
76+
});
77+
});
6278
});

0 commit comments

Comments
 (0)