From d41ca958aba27408fcb83990f0b3a1fea28a6f28 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 1 Dec 2019 12:36:21 +0530 Subject: [PATCH] test: Move wait to list_view.js --- cypress/integration/list_view.js | 6 ++++++ cypress/support/commands.js | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/integration/list_view.js b/cypress/integration/list_view.js index 20a973c1dd..ab2d4a2d86 100644 --- a/cypress/integration/list_view.js +++ b/cypress/integration/list_view.js @@ -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']; diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 5f6d917998..464cbbe1d5 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -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) => {