You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2021/02/09 00:49:53 UTC
[superset] branch master updated: Refresh dashboard list after bulk
delete (#12945)
This is an automated email from the ASF dual-hosted git repository.
rusackas 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 d5e6190 Refresh dashboard list after bulk delete (#12945)
d5e6190 is described below
commit d5e619099873a69e8b6ffe79ad127a4ac1f24454
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Mon Feb 8 21:49:23 2021 -0300
Refresh dashboard list after bulk delete (#12945)
---
.../cypress/integration/chart_list/list_view.test.ts | 11 +++++++++++
.../cypress/integration/dashboard_list/list_view.test.ts | 11 +++++++++++
superset-frontend/src/views/CRUD/chart/ChartList.tsx | 1 +
superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx | 2 ++
4 files changed, 25 insertions(+)
diff --git a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
index ad95a10..5d4e4fc 100644
--- a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts
@@ -47,4 +47,15 @@ describe('chart list view', () => {
.find('[data-test="cell-text"]')
.contains('Location of Current Developers');
});
+
+ it('should bulk delete correctly', () => {
+ cy.get('[data-test="listview-table"]').should('be.visible');
+ cy.get('[data-test="bulk-select"]').eq(0).click();
+ cy.get('[data-test="checkbox-off"]').eq(1).click();
+ cy.get('[data-test="checkbox-off"]').eq(2).click();
+ cy.get('[data-test="bulk-select-action"]').eq(0).click();
+ cy.get('[data-test="delete-modal-input"]').eq(0).type('DELETE');
+ cy.get('[data-test="modal-confirm-button"]').eq(0).click();
+ cy.get('[data-test="checkbox-on"]').should('not.exist');
+ });
});
diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard_list/list_view.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard_list/list_view.test.ts
index 54475eb..c5f25a0 100644
--- a/superset-frontend/cypress-base/cypress/integration/dashboard_list/list_view.test.ts
+++ b/superset-frontend/cypress-base/cypress/integration/dashboard_list/list_view.test.ts
@@ -47,4 +47,15 @@ describe('dashboard list view', () => {
.find('[data-test="cell-text"]')
.contains("World Bank's Data");
});
+
+ it('should bulk delete correctly', () => {
+ cy.get('[data-test="listview-table"]').should('be.visible');
+ cy.get('[data-test="bulk-select"]').eq(0).click();
+ cy.get('[data-test="checkbox-off"]').eq(1).click();
+ cy.get('[data-test="checkbox-off"]').eq(2).click();
+ cy.get('[data-test="bulk-select-action"]').eq(0).click();
+ cy.get('[data-test="delete-modal-input"]').eq(0).type('DELETE');
+ cy.get('[data-test="modal-confirm-button"]').eq(0).click();
+ cy.get('[data-test="checkbox-on"]').should('not.exist');
+ });
});
diff --git a/superset-frontend/src/views/CRUD/chart/ChartList.tsx b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
index 7db24ea..6048cc9 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartList.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
@@ -516,6 +516,7 @@ function ChartList(props: ChartListProps) {
subMenuButtons.push({
name: t('Bulk select'),
buttonStyle: 'secondary',
+ 'data-test': 'bulk-select',
onClick: toggleBulkSelect,
});
}
diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
index bb935d1..76c27f4 100644
--- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
+++ b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
@@ -169,6 +169,7 @@ function DashboardList(props: DashboardListProps) {
)}`,
}).then(
({ json = {} }) => {
+ refreshData();
addSuccessToast(json.message);
},
createErrorHandler(errMsg =>
@@ -471,6 +472,7 @@ function DashboardList(props: DashboardListProps) {
subMenuButtons.push({
name: t('Bulk select'),
buttonStyle: 'secondary',
+ 'data-test': 'bulk-select',
onClick: toggleBulkSelect,
});
}