mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix: tests
This commit is contained in:
parent
6237511c04
commit
f0bedb2176
@ -280,24 +280,96 @@ exports[`renders ./components/layout/demo/fixed.md correctly 1`] = `
|
||||
role="menu"
|
||||
style="line-height:64px"
|
||||
>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 1
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item ant-menu-item-selected"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 2
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 3
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;visibility:hidden"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
@ -1183,24 +1255,96 @@ exports[`renders ./components/layout/demo/top.md correctly 1`] = `
|
||||
role="menu"
|
||||
style="line-height:64px"
|
||||
>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 1
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item ant-menu-item-selected"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 2
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 3
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;visibility:hidden"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
@ -1278,24 +1422,96 @@ exports[`renders ./components/layout/demo/top-side.md correctly 1`] = `
|
||||
role="menu"
|
||||
style="line-height:64px"
|
||||
>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 1
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item ant-menu-item-selected"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 2
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 3
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;visibility:hidden"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
@ -1539,24 +1755,96 @@ exports[`renders ./components/layout/demo/top-side-2.md correctly 1`] = `
|
||||
role="menu"
|
||||
style="line-height:64px"
|
||||
>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 1
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item ant-menu-item-selected"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 2
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
>
|
||||
nav 3
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="line-height:64px;visibility:hidden"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
|
@ -5,6 +5,24 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
|
||||
class="ant-menu ant-menu-light ant-menu-root ant-menu-horizontal"
|
||||
role="menu"
|
||||
>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item ant-menu-item-selected"
|
||||
role="menuitem"
|
||||
@ -29,6 +47,24 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
|
||||
</i>
|
||||
Navigation One
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
aria-disabled="true"
|
||||
class="ant-menu-item ant-menu-item-disabled"
|
||||
@ -54,6 +90,24 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
|
||||
</i>
|
||||
Navigation Two
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal"
|
||||
role="menuitem"
|
||||
@ -63,7 +117,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"
|
||||
>
|
||||
@ -92,6 +148,24 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="display:none"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-item"
|
||||
role="menuitem"
|
||||
@ -104,6 +178,24 @@ exports[`renders ./components/menu/demo/horizontal.md correctly 1`] = `
|
||||
Navigation Four - Link
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
class="ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu"
|
||||
role="menuitem"
|
||||
style="visibility:hidden"
|
||||
>
|
||||
<div
|
||||
aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="ant-menu-submenu-title"
|
||||
>
|
||||
<span>
|
||||
···
|
||||
</span>
|
||||
<i
|
||||
class="ant-menu-submenu-arrow"
|
||||
/>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
`;
|
||||
|
||||
|
@ -3,6 +3,13 @@ import { mount } from 'enzyme';
|
||||
import Menu from '..';
|
||||
import Icon from '../../icon';
|
||||
|
||||
jest.mock('mutationobserver-shim', () => {
|
||||
global.MutationObserver = function MutationObserver() {
|
||||
this.observe = () => {};
|
||||
this.disconnect = () => {};
|
||||
};
|
||||
});
|
||||
|
||||
const { SubMenu } = Menu;
|
||||
|
||||
describe('Menu', () => {
|
||||
|
@ -66,7 +66,7 @@
|
||||
"rc-editor-mention": "^1.0.2",
|
||||
"rc-form": "^2.1.0",
|
||||
"rc-input-number": "~4.0.0",
|
||||
"rc-menu": "7.4.0-beta",
|
||||
"rc-menu": "^7.3.0",
|
||||
"rc-notification": "~3.2.0",
|
||||
"rc-pagination": "~1.17.0",
|
||||
"rc-progress": "~2.2.2",
|
||||
|
Loading…
Reference in New Issue
Block a user