This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new ee9a384 fix: disable text reports for now (#16257)
ee9a384 is described below
commit ee9a384758790ffa7f216231a7751bc0c2970752
Author: Beto Dealmeida <[email protected]>
AuthorDate: Mon Aug 16 08:16:48 2021 -0700
fix: disable text reports for now (#16257)
* fix: disable text reports for now
* Update tests
---
superset-frontend/src/components/ReportModal/index.tsx | 7 +------
.../src/views/CRUD/alert/AlertReportModal.test.jsx | 16 ----------------
.../src/views/CRUD/alert/AlertReportModal.tsx | 7 +------
3 files changed, 2 insertions(+), 28 deletions(-)
diff --git a/superset-frontend/src/components/ReportModal/index.tsx
b/superset-frontend/src/components/ReportModal/index.tsx
index fbdb751..657e5db 100644
--- a/superset-frontend/src/components/ReportModal/index.tsx
+++ b/superset-frontend/src/components/ReportModal/index.tsx
@@ -126,12 +126,7 @@ type ReportActionType =
};
const DEFAULT_NOTIFICATION_FORMAT = 'TEXT';
-const TEXT_BASED_VISUALIZATION_TYPES = [
- 'pivot_table',
- 'pivot_table_v2',
- 'table',
- 'paired_ttest',
-];
+const TEXT_BASED_VISUALIZATION_TYPES: string[] = [];
const reportReducer = (
state: Partial<ReportObject> | null,
diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx
b/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx
index 8575a52..cc9bdc0 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.test.jsx
@@ -260,22 +260,6 @@ describe('AlertReportModal', () => {
expect(wrapper.find(Radio)).toHaveLength(2);
});
- it('renders text option for text-based charts', async () => {
- const props = {
- ...mockedProps,
- alert: mockData,
- };
- const textWrapper = await mountAndWait(props);
-
- const chartOption = textWrapper.find('input[value="chart"]');
- act(() => {
- chartOption.props().onChange({ target: { value: 'chart' } });
- });
- await waitForComponentToPaint(textWrapper);
-
- expect(textWrapper.find('input[value="TEXT"]')).toExist();
- });
-
it('renders input element for working timeout', () => {
expect(wrapper.find('input[name="working_timeout"]')).toExist();
});
diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
index c39783e..f4ff05b 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
@@ -52,12 +52,7 @@ import {
const SELECT_PAGE_SIZE = 2000; // temporary fix for paginated query
const TIMEOUT_MIN = 1;
-const TEXT_BASED_VISUALIZATION_TYPES = [
- 'pivot_table',
- 'pivot_table_v2',
- 'table',
- 'paired_ttest',
-];
+const TEXT_BASED_VISUALIZATION_TYPES: string[] = [];
type SelectValue = {
value: string;