mirror of
https://github.com/apache/superset.git
synced 2026-04-17 07:05:04 +00:00
refactor: Replace react-bootstrap MenuItems with Antd Menu (#11555)
* Remove MenuItem from SubMenu * Fix tests * Refactor PopoverDropdown * Refactor Button * Remove redundant Menu import
This commit is contained in:
committed by
GitHub
parent
ef7087adb6
commit
3e35ddd609
@@ -19,7 +19,7 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { shallow } from 'enzyme';
|
||||
import { Navbar, MenuItem } from 'react-bootstrap';
|
||||
import { Navbar } from 'react-bootstrap';
|
||||
import SubMenu from 'src/components/Menu/SubMenu';
|
||||
|
||||
const defaultProps = {
|
||||
@@ -66,7 +66,7 @@ describe('SubMenu', () => {
|
||||
});
|
||||
|
||||
it('renders 3 MenuItems (when usesRouter === false)', () => {
|
||||
expect(wrapper.find(MenuItem)).toHaveLength(3);
|
||||
expect(wrapper.find('li')).toHaveLength(3);
|
||||
});
|
||||
|
||||
it('renders the menu title', () => {
|
||||
@@ -83,7 +83,7 @@ describe('SubMenu', () => {
|
||||
|
||||
expect(routerWrapper.find(Link)).toExist();
|
||||
expect(routerWrapper.find(Link)).toHaveLength(2);
|
||||
expect(routerWrapper.find(MenuItem)).toHaveLength(1);
|
||||
expect(routerWrapper.find('li.no-router')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('renders buttons in the right nav of the submenu', () => {
|
||||
|
||||
Reference in New Issue
Block a user