fix: update in cypress tests: list_view.js

This commit is contained in:
Gavin D'souza 2019-09-26 13:31:53 +05:30
parent 95334c0afe
commit e14dc883d9
2 changed files with 8 additions and 7 deletions

View file

@ -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');
});
});

View file

@ -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) {