test: Fixes act errors in ErrorAlert test (#21394)

This commit is contained in:
Michael S. Molina 2022-09-08 20:08:12 -03:00 committed by GitHub
parent 08a4cbd27f
commit 700079ff5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,13 @@ import { supersetTheme } from '@superset-ui/core';
import ErrorAlert from './ErrorAlert';
import { ErrorLevel, ErrorSource } from './types';
jest.mock(
'src/components/Icons/Icon',
() =>
({ fileName }: { fileName: string }) =>
<span role="img" aria-label={fileName.replace('_', '-')} />,
);
const mockedProps = {
body: 'Error body',
level: 'warning' as ErrorLevel,