mirror of https://github.com/apache/superset.git
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');
|
||||
|
||||
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',
|
||||
|
|
Loading…
Reference in New Issue