test: Add clear cache command
This commit is contained in:
parent
4b120aabea
commit
8d40f513eb
2 changed files with 7 additions and 1 deletions
|
|
@ -4,8 +4,8 @@ context('List View', () => {
|
|||
cy.visit('/desk');
|
||||
cy.window().its('frappe').then(frappe => {
|
||||
frappe.call("frappe.tests.test_utils.setup_workflow");
|
||||
cy.reload();
|
||||
});
|
||||
cy.clear_cache();
|
||||
});
|
||||
it('enables "Actions" button', () => {
|
||||
const actions = ['Approve', 'Reject', 'Edit', 'Assign To', 'Print','Delete'];
|
||||
|
|
|
|||
|
|
@ -66,6 +66,12 @@ Cypress.Commands.add('go_to_list', (doctype) => {
|
|||
cy.visit(`/desk#List/${doctype}/List`);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clear_cache', () => {
|
||||
cy.window().its('frappe').then(frappe => {
|
||||
frappe.ui.toolbar.clear_cache();
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('dialog', (title, fields) => {
|
||||
cy.window().then(win => {
|
||||
var d = new win.frappe.ui.Dialog({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue