fix: test

This commit is contained in:
Rucha Mahabal 2021-08-16 19:27:29 +05:30
parent 0b4959966c
commit 33032ce07d

View File

@ -3,6 +3,8 @@ context('Organizational Chart', () => {
cy.login(); cy.login();
cy.visit('/app/website'); cy.visit('/app/website');
cy.awesomebar('Organizational Chart'); cy.awesomebar('Organizational Chart');
cy.wait(500);
cy.url().should('include', '/organizational-chart');
cy.window().its('frappe.csrf_token').then(csrf_token => { cy.window().its('frappe.csrf_token').then(csrf_token => {
return cy.request({ return cy.request({
@ -17,6 +19,7 @@ context('Organizational Chart', () => {
}).then(res => { }).then(res => {
expect(res.status).eq(200); expect(res.status).eq(200);
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input'); cy.get('.frappe-control[data-fieldname=company] input').focus().as('input');
cy.get('@input') cy.get('@input')
.clear({ force: true }) .clear({ force: true })
.type('Test Org Chart{enter}', { force: true }) .type('Test Org Chart{enter}', { force: true })