test: Move wait to list_view.js

This commit is contained in:
Suraj Shetty 2019-12-01 12:36:21 +05:30
parent 9f3b0b59fc
commit d41ca958ab
2 changed files with 6 additions and 6 deletions

View file

@ -5,7 +5,13 @@ context('List View', () => {
cy.window().its('frappe').then(frappe => {
frappe.call("frappe.tests.ui_test_helpers.setup_workflow");
});
cy.server();
cy.route({
method: 'POST',
url: 'frappe.sessions.clear'
}).as('clear-cache');
cy.clear_cache();
cy.wait(['@clear-cache']);
});
it('enables "Actions" button', () => {
const actions = ['Approve', 'Reject', 'Edit', 'Assign To', 'Apply Assignment Rule', 'Print', 'Delete'];

View file

@ -162,15 +162,9 @@ Cypress.Commands.add('go_to_list', (doctype) => {
});
Cypress.Commands.add('clear_cache', () => {
cy.server();
cy.route({
method: 'POST',
url: 'frappe.sessions.clear'
}).as('clear-cache');
cy.window().its('frappe').then(frappe => {
frappe.ui.toolbar.clear_cache();
});
cy.wait(['@clear-cache']);
});
Cypress.Commands.add('dialog', (opts) => {