Skip to content

Commit

Permalink
refactor: icon to icons for headeractionsdropdown (apache#15560)
Browse files Browse the repository at this point in the history
* initial commit

* fix test

* fix cypress

* fix markdown cypress test
  • Loading branch information
pkdotson authored Jul 7, 2021
1 parent 83be06d commit 29dd084
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('Dashboard top-level controls', () => {
// should allow force refresh
WORLD_HEALTH_CHARTS.forEach(waitForChartLoad);
getChartAliasesBySpec(WORLD_HEALTH_CHARTS).then(aliases => {
cy.get('[data-test="more-horiz"]').click();
cy.get('[aria-label="more-horiz"]').click();
cy.get('[data-test="refresh-dashboard-menu-item"]').should(
'not.have.class',
'ant-dropdown-menu-item-disabled',
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('Dashboard top-level controls', () => {
});
});
});
cy.get('[data-test="more-horiz"]').click();
cy.get('[aria-label="more-horiz"]').click();
cy.get('[data-test="refresh-dashboard-menu-item"]').and(
'not.have.class',
'ant-dropdown-menu-item-disabled',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Dashboard edit markdown', () => {

// lazy load - need to open dropdown for the scripts to load
cy.get('[data-test="dashboard-header"]')
.find('[data-test="more-horiz"]')
.find('[aria-label="more-horiz"]')
.click();
cy.get('script').then(nodes => {
// load 5 new script chunks for css editor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Dashboard save action', () => {
'copyRequest',
);

cy.get('[data-test="more-horiz"]').trigger('click', { force: true });
cy.get('[aria-label="more-horiz"]').trigger('click', { force: true });
cy.get('[data-test="save-as-menu-item"]').trigger('click', {
force: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import PropTypes from 'prop-types';
import { styled, SupersetClient, t } from '@superset-ui/core';

import { Menu, NoAnimationDropdown } from 'src/common/components';
import Icon from 'src/components/Icon';
import Icons from 'src/components/Icons';
import { URL_PARAMS } from 'src/constants';
import ShareMenuItems from 'src/dashboard/components/menu/ShareMenuItems';
import CssEditor from 'src/dashboard/components/CssEditor';
Expand Down Expand Up @@ -88,6 +88,9 @@ const MENU_KEYS = {

const DropdownButton = styled.div`
margin-left: ${({ theme }) => theme.gridUnit * 2.5}px;
span {
color: ${({ theme }) => theme.colors.grayscale.base};
}
`;

const SCREENSHOT_NODE_SELECTOR = '.dashboard';
Expand Down Expand Up @@ -328,7 +331,7 @@ class HeaderActionsDropdown extends React.PureComponent {
}
>
<DropdownButton id="save-dash-split-button" role="button">
<Icon name="more-horiz" />
<Icons.MoreHoriz />
</DropdownButton>
</NoAnimationDropdown>
);
Expand Down

0 comments on commit 29dd084

Please sign in to comment.