Skip to content

Commit

Permalink
test: Fix act errors in DatasourceControl test (apache#22845)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams authored and PawankumarES committed Feb 13, 2023
1 parent 053e17d commit 726528f
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ import DatasourceControl from '.';

const SupersetClientGet = jest.spyOn(SupersetClient, 'get');

jest.mock('src/components/Icons/Icon', () => ({
__esModule: true,
default: ({
fileName,
role,
...rest
}: {
fileName: string;
role: string;
}) => (
<span
role={role ?? 'img'}
aria-label={fileName.replace('_', '-')}
{...rest}
/>
),
StyledIcon: () => <span />,
}));

const createProps = (overrides: JsonObject = {}) => ({
hovered: false,
type: 'DatasourceControl',
Expand Down

0 comments on commit 726528f

Please sign in to comment.