refactor: icon to icons for toasts component (#15579)

* initial commit

* remove code

* fix test

* Update superset-frontend/src/messageToasts/components/Toast.tsx

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>

* Update superset-frontend/src/messageToasts/components/Toast.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

* Update superset-frontend/src/messageToasts/components/Toast.tsx

Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
This commit is contained in:
Phillip Kelley-Dotson
2021-07-09 10:50:48 -07:00
committed by GitHub
parent f67e40236d
commit 600473ff72
2 changed files with 17 additions and 10 deletions

View File

@@ -18,6 +18,7 @@
*/
import React from 'react';
import { mount } from 'enzyme';
import { ThemeProvider, supersetTheme } from '@superset-ui/core';
import Toast from 'src/messageToasts/components/Toast';
import { act } from 'react-dom/test-utils';
import mockMessageToasts from '../mockMessageToasts';
@@ -27,7 +28,11 @@ const props = {
onCloseToast() {},
};
const setup = overrideProps => mount(<Toast {...props} {...overrideProps} />);
const setup = overrideProps =>
mount(<Toast {...props} {...overrideProps} />, {
wrappingComponent: ThemeProvider,
wrappingComponentProps: { theme: supersetTheme },
});
describe('Toast', () => {
it('should render', () => {