This commit is contained in:
picodoth 2018-07-13 19:45:49 +08:00 committed by 陈帅
parent 5c7f9feecb
commit f1570c01ea
2 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,9 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
aria-haspopup="true"
class="ant-menu-submenu-title"
>
<span>
<span
class="submenu-title-wrapper"
>
<i
class="anticon anticon-setting"
/>

View File

@ -85,6 +85,7 @@ describe('Menu', () => {
wrapper.update();
expect(wrapper.find('.ant-menu-sub').hostNodes().at(0).hasClass('ant-menu-hidden')).toBe(true);
wrapper.setProps({ openKeys: ['1'] });
wrapper.update();
expect(wrapper.find('.ant-menu-sub').hostNodes().at(0).hasClass('ant-menu-hidden')).not.toBe(true);
});
@ -103,6 +104,7 @@ describe('Menu', () => {
wrapper.update();
expect(wrapper.find('.ant-menu-sub').hostNodes().at(0).hasClass('ant-menu-hidden')).toBe(true);
wrapper.setProps({ openKeys: ['1'] });
wrapper.update();
expect(wrapper.find('.ant-menu-sub').hostNodes().at(0).hasClass('ant-menu-hidden')).not.toBe(true);
});
@ -121,6 +123,7 @@ describe('Menu', () => {
wrapper.update();
expect(wrapper.find('.ant-menu-sub').hostNodes().at(0).hasClass('ant-menu-hidden')).toBe(true);
wrapper.setProps({ openKeys: ['1'] });
wrapper.update();
expect(wrapper.find('.ant-menu-sub').hostNodes().at(0).hasClass('ant-menu-hidden')).not.toBe(true);
});