diff --git a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx index 79f3452dc0873..6fc4bc88a43bd 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx @@ -22,7 +22,7 @@ import { Slice } from 'src/types/Chart'; import { render, screen, waitFor } from 'spec/helpers/testing-library'; import fetchMock from 'fetch-mock'; import userEvent from '@testing-library/user-event'; -import PropertiesModal from '.'; +import PropertiesModal, { PropertiesModalProps } from '.'; const createProps = () => ({ slice: { @@ -68,6 +68,7 @@ const createProps = () => ({ show: true, onHide: jest.fn(), onSave: jest.fn(), + addSuccessToast: jest.fn(), }); fetchMock.get('glob:*/api/v1/chart/318', { @@ -160,7 +161,7 @@ afterAll(() => { fetchMock.resetBehavior(); }); -const renderModal = (props: any) => +const renderModal = (props: PropertiesModalProps) => render(, { useRedux: true }); test('Should render null when show:false', async () => { diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx index 22df03cd0d86f..022b74f02907d 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx @@ -28,7 +28,7 @@ import Chart, { Slice } from 'src/types/Chart'; import { getClientErrorObject } from 'src/utils/getClientErrorObject'; import withToasts from 'src/components/MessageToasts/withToasts'; -type PropertiesModalProps = { +export type PropertiesModalProps = { slice: Slice; show: boolean; onHide: () => void;