diff --git a/cypress/integration/list_view.js b/cypress/integration/list_view.js index fcae02919a..8d37b19c89 100644 --- a/cypress/integration/list_view.js +++ b/cypress/integration/list_view.js @@ -19,14 +19,13 @@ context('List View', () => { cy.route({ method: 'POST', url:'api/method/frappe.model.workflow.bulk_workflow_approval' - }).then(()=> { - cy.route({ - method: 'GET', - url:'api/method/frappe.desk.reportview.get' - }) - }).as('update-view'); + }).as('bulk-approval'); + cy.route({ + method: 'POST', + url:'api/method/frappe.desk.reportview.get' + }).as('real-time-update'); cy.wrap(elements).contains('Approve').click(); - cy.wait('@update-view'); + cy.wait(['@bulk-approval', '@real-time-update']); cy.get('.list-row-container:visible').should('contain', 'Approved'); }); }); diff --git a/frappe/public/js/frappe/list/list_view.js b/frappe/public/js/frappe/list/list_view.js index 8753caff2f..07055482b2 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -1041,7 +1041,6 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { // in the listview according to filters applied // let's remove it manually this.data = this.data.filter(d => d.name !== name); - this.$result.find('.list-row-container').remove(); this.render_list(); return; }