mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
test: Fix act errors in DatasourceControl test (#22845)
This commit is contained in:
parent
050cbe938f
commit
ddd5cd3aec
@ -27,6 +27,25 @@ import DatasourceControl from '.';
|
|||||||
|
|
||||||
const SupersetClientGet = jest.spyOn(SupersetClient, 'get');
|
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 = {}) => ({
|
const createProps = (overrides: JsonObject = {}) => ({
|
||||||
hovered: false,
|
hovered: false,
|
||||||
type: 'DatasourceControl',
|
type: 'DatasourceControl',
|
||||||
|
Loading…
Reference in New Issue
Block a user