diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx b/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx index fb58c13043d43..1598e5a926f32 100644 --- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx +++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx @@ -340,4 +340,22 @@ describe('AlertReportModal', () => { await waitForComponentToPaint(wrapper); expect(wrapper.find('textarea[name="recipients"]')).toHaveLength(1); }); + + it('renders bypass cache checkbox', async () => { + const bypass = wrapper.find('[data-test="bypass-cache"]'); + expect(bypass).toExist(); + }); + + it('renders no bypass cache checkbox when alert', async () => { + const props = { + ...mockedProps, + alert: mockData, + isReport: false, + }; + + const alertWrapper = await mountAndWait(props); + + const bypass = alertWrapper.find('[data-test="bypass-cache"]'); + expect(bypass).not.toExist(); + }); }); diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx index c3782390295f5..102e5c133b2c5 100644 --- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx +++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx @@ -1368,19 +1368,20 @@ const AlertReportModal: FunctionComponent = ({ )} - {isReport && ( -
- - Ignore cache when generating screenshot - -
- )} )} + {isReport && ( +
+ + Ignore cache when generating screenshot + +
+ )}

{t('Notification method')}

* diff --git a/tests/integration_tests/reports/commands_tests.py b/tests/integration_tests/reports/commands_tests.py index 765287647a807..f914941e919e9 100644 --- a/tests/integration_tests/reports/commands_tests.py +++ b/tests/integration_tests/reports/commands_tests.py @@ -1039,13 +1039,6 @@ def test_email_dashboard_report_schedule_force_screenshot( notification_targets = get_target_from_report_schedule( create_report_email_dashboard_force_screenshot ) - # assert that the link sent is correct - assert ( - 'Explore in Superset' - in email_mock.call_args[0][2] - ) # Assert the email smtp address assert email_mock.call_args[0][0] == notification_targets[0]