mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +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
@@ -69,10 +69,10 @@ describe('DashboardTable', () => {
|
||||
|
||||
it('render a submenu with clickable tabs and buttons', async () => {
|
||||
expect(wrapper.find(SubMenu)).toExist();
|
||||
expect(wrapper.find('MenuItem')).toHaveLength(2);
|
||||
expect(wrapper.find('li')).toHaveLength(2);
|
||||
expect(wrapper.find('Button')).toHaveLength(4);
|
||||
act(() => {
|
||||
wrapper.find('MenuItem').at(1).simulate('click');
|
||||
wrapper.find('li').at(1).simulate('click');
|
||||
});
|
||||
await waitForComponentToPaint(wrapper);
|
||||
expect(fetchMock.calls(/dashboard\/\?q/)).toHaveLength(1);
|
||||
|
||||
@@ -89,10 +89,10 @@ describe('SavedQueries', () => {
|
||||
|
||||
it('it renders a submenu with clickable tables and buttons', async () => {
|
||||
expect(wrapper.find(SubMenu)).toExist();
|
||||
expect(wrapper.find('MenuItem')).toHaveLength(2);
|
||||
expect(wrapper.find('li')).toHaveLength(2);
|
||||
expect(wrapper.find('button')).toHaveLength(2);
|
||||
act(() => {
|
||||
wrapper.find('MenuItem').at(1).simulate('click');
|
||||
wrapper.find('li').at(1).simulate('click');
|
||||
});
|
||||
|
||||
await waitForComponentToPaint(wrapper);
|
||||
|
||||
Reference in New Issue
Block a user