diff --git a/cypress/integration/list_view.js b/cypress/integration/list_view.js index 1cf7f4e6d8..9b3efd3b8e 100644 --- a/cypress/integration/list_view.js +++ b/cypress/integration/list_view.js @@ -19,13 +19,14 @@ context('List View', () => { cy.route({ method: 'POST', url:'api/method/frappe.model.workflow.bulk_workflow_approval' - }).as('bulk-approval'); - cy.route({ - method: 'GET', - url:'api/method/frappe.desk.reportview.get*' - }).as('update-list'); + }).then(()=> { + cy.route({ + method: 'POST', + url:'api/method/frappe.desk.reportview.get' + }) + }).as('update-view'); cy.wrap(elements).contains('Approve').click(); - cy.wait(['@bulk-approval', '@update-list']); + cy.wait('@update-view'); 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 d63cabfbfe..8753caff2f 100644 --- a/frappe/public/js/frappe/list/list_view.js +++ b/frappe/public/js/frappe/list/list_view.js @@ -129,7 +129,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList { this.toggle_auto_refresh(false), item.action, this.toggle_auto_refresh(true) - ]) + ]); } const $item = this.page.add_actions_menu_item(item.label, action, item.standard); if (item.class) {