diff --git a/packages/mui-material/src/Modal/Modal.test.js b/packages/mui-material/src/Modal/Modal.test.js index 20823b66e8dc21..efea82a0e1f8bf 100644 --- a/packages/mui-material/src/Modal/Modal.test.js +++ b/packages/mui-material/src/Modal/Modal.test.js @@ -132,7 +132,7 @@ describe('', () => { } render( - +
, ); @@ -165,7 +165,15 @@ describe('', () => { return
; } render( - +
, ); @@ -176,7 +184,15 @@ describe('', () => { it('should attach a handler to the backdrop that fires onClose', () => { const onClose = spy(); const { getByTestId } = render( - +
, ); @@ -220,7 +236,15 @@ describe('', () => { it('should call through to the user specified onBackdropClick callback', () => { const onBackdropClick = spy(); const { getByTestId } = render( - + { + if (reason === 'backdropClick') { + onBackdropClick(); + } + }} + open + slotProps={{ backdrop: { 'data-testid': 'backdrop' } }} + >
, ); @@ -241,7 +265,15 @@ describe('', () => { } const onBackdropClick = spy(); const { getByTestId } = render( - + { + if (reason === 'backdropClick') { + onBackdropClick(); + } + }} + open + slots={{ backdrop: CustomBackdrop }} + >
, );