fix(minor): lint

This commit is contained in:
Rushabh Mehta 2022-06-09 12:44:47 +05:30
parent e790b5e8b1
commit da9ac52ffb

View file

@ -140,10 +140,6 @@ Cypress.Commands.add('create_records', doc => {
.then(r => r.message); .then(r => r.message);
}); });
Cypress.Commands.add('open_doc', (doctype, name) => {
cy.visit(`/app/${doctype}/${name}`)
});
Cypress.Commands.add('set_value', (doctype, name, obj) => { Cypress.Commands.add('set_value', (doctype, name, obj) => {
return cy.call('frappe.client.set_value', { return cy.call('frappe.client.set_value', {
doctype, doctype,
@ -272,13 +268,13 @@ Cypress.Commands.add('get_open_dialog', () => {
Cypress.Commands.add('save', () => { Cypress.Commands.add('save', () => {
cy.intercept('/api').as('api'); cy.intercept('/api').as('api');
cy.get(`button[data-label="Save"]:visible`).click({scrollBehavior: false, force:true}); cy.get(`button[data-label="Save"]:visible`).click({scrollBehavior: false, force: true});
cy.wait('@api'); cy.wait('@api');
}); });
Cypress.Commands.add('hide_dialog', () => { Cypress.Commands.add('hide_dialog', () => {
cy.wait(400); cy.wait(400);
cy.get_open_dialog().find('.btn-modal-close').click({force:true}); cy.get_open_dialog().find('.btn-modal-close').click({force: true});
cy.get('.modal:visible').should('not.exist'); cy.get('.modal:visible').should('not.exist');
}); });