test: fix drawer test case

pull/11472/merge 3.8.0
afc163 7 years ago
parent a728081d0f
commit 1b3d063990

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

@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Drawer closable is false 1`] = ` exports[`Drawer className is test_drawer 1`] = `
<div <div
class="" class=""
> >
<div <div
class="ant-drawer ant-drawer-right" class="ant-drawer ant-drawer-right test_drawer"
> >
<div <div
class="ant-drawer-mask" class="ant-drawer-mask"
@ -19,8 +19,16 @@ exports[`Drawer closable is false 1`] = `
> >
<div <div
class="ant-drawer-wrapper-body" class="ant-drawer-wrapper-body"
style="overflow:auto;height:100%" 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 <div
class="ant-drawer-body" class="ant-drawer-body"
> >
@ -33,7 +41,7 @@ exports[`Drawer closable is false 1`] = `
</div> </div>
`; `;
exports[`Drawer destroyOnClose is true 1`] = ` exports[`Drawer closable is false 1`] = `
<div <div
class="" class=""
> >
@ -52,16 +60,8 @@ exports[`Drawer destroyOnClose is true 1`] = `
> >
<div <div
class="ant-drawer-wrapper-body" class="ant-drawer-wrapper-body"
style="overflow:auto;height:100%;opacity:0;transition:opacity .3s" style="overflow:auto;height:100%"
> >
<button
aria-label="Close"
class="ant-drawer-close"
>
<span
class="ant-drawer-close-x"
/>
</button>
<div <div
class="ant-drawer-body" class="ant-drawer-body"
> >
@ -74,7 +74,7 @@ exports[`Drawer destroyOnClose is true 1`] = `
</div> </div>
`; `;
exports[`Drawer have a title 1`] = ` exports[`Drawer destroyOnClose is true 1`] = `
<div <div
class="" class=""
> >
@ -93,17 +93,8 @@ exports[`Drawer have a title 1`] = `
> >
<div <div
class="ant-drawer-wrapper-body" class="ant-drawer-wrapper-body"
style="overflow:auto;height:100%" style="overflow:auto;height:100%;opacity:0;transition:opacity .3s"
> >
<div
class="ant-drawer-header"
>
<div
class="ant-drawer-title"
>
Test Title
</div>
</div>
<button <button
aria-label="Close" aria-label="Close"
class="ant-drawer-close" class="ant-drawer-close"
@ -124,7 +115,7 @@ exports[`Drawer have a title 1`] = `
</div> </div>
`; `;
exports[`Drawer render correctly 1`] = ` exports[`Drawer have a title 1`] = `
<div <div
class="" class=""
> >
@ -136,7 +127,7 @@ exports[`Drawer render correctly 1`] = `
/> />
<div <div
class="ant-drawer-content-wrapper" class="ant-drawer-content-wrapper"
style="transform:translateX(100%);width:400px" style="transform:translateX(100%);width:256px"
> >
<div <div
class="ant-drawer-content" class="ant-drawer-content"
@ -145,6 +136,15 @@ exports[`Drawer render correctly 1`] = `
class="ant-drawer-wrapper-body" class="ant-drawer-wrapper-body"
style="overflow:auto;height:100%" style="overflow:auto;height:100%"
> >
<div
class="ant-drawer-header"
>
<div
class="ant-drawer-title"
>
Test Title
</div>
</div>
<button <button
aria-label="Close" aria-label="Close"
class="ant-drawer-close" class="ant-drawer-close"
@ -165,26 +165,26 @@ exports[`Drawer render correctly 1`] = `
</div> </div>
`; `;
exports[`Drawer wrapClassName is test_drawer 1`] = ` exports[`Drawer render correctly 1`] = `
<div <div
class="" class=""
> >
<div <div
class="ant-drawer ant-drawer-right test_drawer" class="ant-drawer ant-drawer-right"
> >
<div <div
class="ant-drawer-mask" class="ant-drawer-mask"
/> />
<div <div
class="ant-drawer-content-wrapper" class="ant-drawer-content-wrapper"
style="transform:translateX(100%);width:256px" style="transform:translateX(100%);width:400px"
> >
<div <div
class="ant-drawer-content" class="ant-drawer-content"
> >
<div <div
class="ant-drawer-wrapper-body" class="ant-drawer-wrapper-body"
style="overflow:auto;height:100%;opacity:0;transition:opacity .3s" style="overflow:auto;height:100%"
> >
<button <button
aria-label="Close" aria-label="Close"

Loading…
Cancel
Save