test: fix drawer test case

This commit is contained in:
afc163 2018-08-05 14:16:08 +08:00
parent a728081d0f
commit 1b3d063990
2 changed files with 43 additions and 43 deletions

View File

@ -55,12 +55,12 @@ describe('Drawer', () => {
expect(wrapper).toMatchSnapshot();
});
it('wrapClassName is test_drawer', () => {
it('className is test_drawer', () => {
const wrapper = render(
<Drawer
destroyOnClose
visible={false}
wrapClassName="test_drawer"
className="test_drawer"
getContainer={false}
>
Here is content of Drawer

View File

@ -1,5 +1,46 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Drawer className is test_drawer 1`] = `
<div
class=""
>
<div
class="ant-drawer ant-drawer-right test_drawer"
>
<div
class="ant-drawer-mask"
/>
<div
class="ant-drawer-content-wrapper"
style="transform:translateX(100%);width:256px"
>
<div
class="ant-drawer-content"
>
<div
class="ant-drawer-wrapper-body"
style="overflow:auto;height:100%;opacity:0;transition:opacity .3s"
>
<button
aria-label="Close"
class="ant-drawer-close"
>
<span
class="ant-drawer-close-x"
/>
</button>
<div
class="ant-drawer-body"
>
Here is content of Drawer
</div>
</div>
</div>
</div>
</div>
</div>
`;
exports[`Drawer closable is false 1`] = `
<div
class=""
@ -164,44 +205,3 @@ exports[`Drawer render correctly 1`] = `
</div>
</div>
`;
exports[`Drawer wrapClassName is test_drawer 1`] = `
<div
class=""
>
<div
class="ant-drawer ant-drawer-right test_drawer"
>
<div
class="ant-drawer-mask"
/>
<div
class="ant-drawer-content-wrapper"
style="transform:translateX(100%);width:256px"
>
<div
class="ant-drawer-content"
>
<div
class="ant-drawer-wrapper-body"
style="overflow:auto;height:100%;opacity:0;transition:opacity .3s"
>
<button
aria-label="Close"
class="ant-drawer-close"
>
<span
class="ant-drawer-close-x"
/>
</button>
<div
class="ant-drawer-body"
>
Here is content of Drawer
</div>
</div>
</div>
</div>
</div>
</div>
`;