diff --git a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx
index 1b1cb30424e8f..8779f8ef2f064 100644
--- a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx
+++ b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx
@@ -190,6 +190,7 @@ test('should refresh the charts', async () => {
await openDropdown();
userEvent.click(screen.getByText('Refresh dashboard'));
expect(mockedProps.forceRefreshAllCharts).toHaveBeenCalledTimes(1);
+ expect(mockedProps.addSuccessToast).toHaveBeenCalledTimes(1);
});
test('should show the properties modal', async () => {
diff --git a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx
index a7cb30218de39..ef7fd17d22de0 100644
--- a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx
+++ b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx
@@ -151,6 +151,7 @@ class HeaderActionsDropdown extends React.PureComponent {
switch (key) {
case MENU_KEYS.REFRESH_DASHBOARD:
this.props.forceRefreshAllCharts();
+ this.props.addSuccessToast(t('Data refreshed'));
break;
case MENU_KEYS.EDIT_PROPERTIES:
this.props.showPropertiesModal();
@@ -276,6 +277,7 @@ class HeaderActionsDropdown extends React.PureComponent {
({
onlyApply: false,
onHide: jest.fn(),
onSubmit: jest.fn(),
+ addSuccessToast: jest.fn(),
});
beforeEach(() => {
diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
index 2ce295b81a10f..41d0850035a0e 100644
--- a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
@@ -313,6 +313,7 @@ const PropertiesModal = ({
...moreOnSubmitProps,
};
if (onlyApply) {
+ addSuccessToast(t('Dashboard properties updated'));
onSubmit(onSubmitProps);
onHide();
} else {
diff --git a/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx b/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx
index cb4d4808e257a..9f2f68a9d6451 100644
--- a/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx
+++ b/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx
@@ -133,6 +133,7 @@ const defaultRefreshIntervalModalProps = {
refreshFrequency: 0,
onChange: jest.fn(),
editMode: true,
+ addSuccessToast: jest.fn(),
};
describe('RefreshIntervalModal - RTL', () => {
@@ -214,6 +215,7 @@ describe('RefreshIntervalModal - RTL', () => {
10,
editModeOnProps.editMode,
);
+ expect(editModeOnProps.addSuccessToast).toHaveBeenCalled();
});
it('should show warning message', async () => {
diff --git a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx
index 3a8aef03727c9..896792ceebf68 100644
--- a/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx
+++ b/superset-frontend/src/dashboard/components/RefreshIntervalModal.tsx
@@ -49,6 +49,7 @@ const RefreshWarningContainer = styled.div`
`;
type RefreshIntervalModalProps = {
+ addSuccessToast: (msg: string) => void;
triggerNode: JSX.Element;
refreshFrequency: number;
onChange: (refreshLimit: number, editMode: boolean) => void;
@@ -86,6 +87,7 @@ class RefreshIntervalModal extends React.PureComponent<
onSave() {
this.props.onChange(this.state.refreshFrequency, this.props.editMode);
this.modalRef.current?.close();
+ this.props.addSuccessToast(t('Refresh interval saved'));
}
onCancel() {
diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx
index 979073fd036bf..ff8349ee8b6bc 100644
--- a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx
+++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx
@@ -230,6 +230,7 @@ test('Should "Force refresh"', () => {
userEvent.click(screen.getByRole('menuitem', { name: /Force refresh/ }));
expect(props.forceRefresh).toBeCalledTimes(1);
expect(props.forceRefresh).toBeCalledWith(371, 26);
+ expect(props.addSuccessToast).toBeCalledTimes(1);
});
test('Should "Maximize chart"', () => {
diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
index 6784eabef12de..d389542b0390d 100644
--- a/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
+++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/index.tsx
@@ -163,6 +163,7 @@ class SliceHeaderControls extends React.PureComponent<
switch (key) {
case MENU_KEYS.FORCE_REFRESH:
this.refreshChart();
+ this.props.addSuccessToast(t('Data refreshed'));
break;
case MENU_KEYS.CROSS_FILTER_SCOPING:
this.setState({ showCrossFilterScopingModal: true });