|
|
@ -97,7 +97,7 @@ describe('Menu', () => {
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await asyncExpect(() => {
|
|
|
|
await asyncExpect(() => {
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
expect($$('ul.ant-menu-sub')[0].style.display).not.toBe('none');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -119,7 +119,7 @@ describe('Menu', () => {
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await asyncExpect(() => {
|
|
|
|
await asyncExpect(() => {
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -149,14 +149,14 @@ describe('Menu', () => {
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await sleep(100);
|
|
|
|
await sleep(100);
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
|
|
|
wrapper.setProps({ openKeys: [] });
|
|
|
|
wrapper.setProps({ openKeys: [] });
|
|
|
|
await sleep(100);
|
|
|
|
await sleep(100);
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).toBe('none');
|
|
|
|
expect($$('.ant-menu-submenu-popup')[0].style.display).toBe('none');
|
|
|
|
await sleep(100);
|
|
|
|
await sleep(100);
|
|
|
|
wrapper.setProps({ openKeys: ['1'] });
|
|
|
|
wrapper.setProps({ openKeys: ['1'] });
|
|
|
|
await sleep(100);
|
|
|
|
await sleep(100);
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// it('inline', async () => {
|
|
|
|
// it('inline', async () => {
|
|
|
@ -219,15 +219,15 @@ describe('Menu', () => {
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
{ attachTo: 'body', sync: false },
|
|
|
|
);
|
|
|
|
);
|
|
|
|
await asyncExpect(() => {
|
|
|
|
await asyncExpect(() => {
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
wrapper.setProps({ openKeys: [] });
|
|
|
|
wrapper.setProps({ openKeys: [] });
|
|
|
|
await asyncExpect(() => {
|
|
|
|
await asyncExpect(() => {
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).toBe('none');
|
|
|
|
expect($$('.ant-menu-submenu-popup')[0].style.display).toBe('none');
|
|
|
|
}, 500);
|
|
|
|
}, 500);
|
|
|
|
wrapper.setProps({ openKeys: ['1'] });
|
|
|
|
wrapper.setProps({ openKeys: ['1'] });
|
|
|
|
await asyncExpect(() => {
|
|
|
|
await asyncExpect(() => {
|
|
|
|
expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
|
|
|
}, 100);
|
|
|
|
}, 100);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -459,11 +459,11 @@ describe('Menu', () => {
|
|
|
|
// }, 0);
|
|
|
|
// }, 0);
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// expect($$('.ant-menu-sub').length).toBe(1);
|
|
|
|
// expect($$('.ant-menu-sub').length).toBe(1);
|
|
|
|
// expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
// expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
|
|
|
// toggleMenu(wrapper, 0, 'mouseleave');
|
|
|
|
// toggleMenu(wrapper, 0, 'mouseleave');
|
|
|
|
// }, 500);
|
|
|
|
// }, 500);
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// expect($$('.ant-menu-sub')[0].parentElement.style.display).toBe('none');
|
|
|
|
// expect($$('.ant-menu-submenu-popup')[0].style.display).toBe('none');
|
|
|
|
// }, 500);
|
|
|
|
// }, 500);
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
@ -490,11 +490,11 @@ describe('Menu', () => {
|
|
|
|
// }, 100);
|
|
|
|
// }, 100);
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// expect($$('.ant-menu-sub').length).toBe(1);
|
|
|
|
// expect($$('.ant-menu-sub').length).toBe(1);
|
|
|
|
// expect($$('.ant-menu-sub')[0].parentElement.style.display).not.toBe('none');
|
|
|
|
// expect($$('.ant-menu-submenu-popup')[0].style.display).not.toBe('none');
|
|
|
|
// toggleMenu(wrapper, 1, 'mouseleave');
|
|
|
|
// toggleMenu(wrapper, 1, 'mouseleave');
|
|
|
|
// }, 500);
|
|
|
|
// }, 500);
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// await asyncExpect(() => {
|
|
|
|
// expect($$('.ant-menu-sub')[0].parentElement.style.display).toBe('none');
|
|
|
|
// expect($$('.ant-menu-submenu-popup')[0].style.display).toBe('none');
|
|
|
|
// }, 500);
|
|
|
|
// }, 500);
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|