mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
test: Fix act errors in DatasourceControl test (#22845)
This commit is contained in:
committed by
GitHub
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',
|
||||
|
||||
Reference in New Issue
Block a user