mirror of https://github.com/apache/superset.git
Refresh dashboard list after bulk delete (#12945)
This commit is contained in:
parent
dd0af74019
commit
d5e6190998
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -516,6 +516,7 @@ function ChartList(props: ChartListProps) {
|
|||
subMenuButtons.push({
|
||||
name: t('Bulk select'),
|
||||
buttonStyle: 'secondary',
|
||||
'data-test': 'bulk-select',
|
||||
onClick: toggleBulkSelect,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue