diff --git a/packages/material-ui/src/Drawer/Drawer.js b/packages/material-ui/src/Drawer/Drawer.js index 3421722f7f0b4f..1bd5ee5b1fc284 100644 --- a/packages/material-ui/src/Drawer/Drawer.js +++ b/packages/material-ui/src/Drawer/Drawer.js @@ -134,6 +134,7 @@ const Drawer = React.forwardRef(function Drawer(props, ref) { {children} diff --git a/packages/material-ui/src/Drawer/Drawer.test.js b/packages/material-ui/src/Drawer/Drawer.test.js index c05c16bb5fa0ce..9b281357735114 100644 --- a/packages/material-ui/src/Drawer/Drawer.test.js +++ b/packages/material-ui/src/Drawer/Drawer.test.js @@ -1,5 +1,5 @@ import React from 'react'; -import { assert } from 'chai'; +import { assert, expect } from 'chai'; import { createMount, findOutermostIntrinsic, getClasses } from '@material-ui/core/test-utils'; import { ThemeProvider, createMuiTheme } from '@material-ui/core/styles'; import describeConformance from '../test-utils/describeConformance'; @@ -7,10 +7,12 @@ import Slide from '../Slide'; import Paper from '../Paper'; import Modal from '../Modal'; import Drawer, { getAnchor, isHorizontal } from './Drawer'; +import { createClientRender } from 'test/utils/createClientRender'; describe('', () => { let mount; let classes; + const render = createClientRender({ strict: false }); before(() => { // StrictModeViolation: uses Slide @@ -217,6 +219,17 @@ describe('', () => { }); }); + describe('prop: PaperProps', () => { + it('should merge class names', () => { + const { container } = render( + +

Hello

+
, + ); + expect(container.querySelector(`.${classes.paper}`)).to.have.class('my-class'); + }); + }); + describe('slide direction', () => { it('should return the opposing slide direction', () => { const wrapper = mount(