fix(tests): apply filters correctly
This commit is contained in:
parent
7270ab5c20
commit
6e46be5058
@ -5,14 +5,15 @@ context('Organizational Chart', () => {
|
||||
cy.awesomebar('Organizational Chart');
|
||||
|
||||
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input');
|
||||
cy.get('@input').clear().type('Test Org Chart');
|
||||
cy.get('@input').clear().wait(200).type('Test Org Chart');
|
||||
cy.get('@input').type('{enter}', { delay: 100 });
|
||||
cy.get('@input').blur();
|
||||
|
||||
cy.get('body').click();
|
||||
cy.wait(500);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
cy.window().its('frappe').then(frappe => {
|
||||
return cy.window().its('frappe').then(frappe => {
|
||||
return frappe.call('erpnext.tests.ui_test_helpers.create_employee_records');
|
||||
}).as('employee_records');
|
||||
});
|
||||
|
@ -6,9 +6,10 @@ context('Organizational Chart Mobile', () => {
|
||||
cy.awesomebar('Organizational Chart');
|
||||
|
||||
cy.get('.frappe-control[data-fieldname=company] input').focus().as('input');
|
||||
cy.get('@input').clear().type('Test Org Chart');
|
||||
cy.get('@input').clear().wait(200).type('Test Org Chart');
|
||||
cy.get('@input').type('{enter}', { delay: 100 });
|
||||
cy.get('@input').blur();
|
||||
|
||||
cy.get('body').click();
|
||||
cy.wait(500);
|
||||
});
|
||||
|
||||
@ -16,7 +17,7 @@ context('Organizational Chart Mobile', () => {
|
||||
cy.viewport(375, 667);
|
||||
cy.wait(500);
|
||||
|
||||
cy.window().its('frappe').then(frappe => {
|
||||
return cy.window().its('frappe').then(frappe => {
|
||||
return frappe.call('erpnext.tests.ui_test_helpers.create_employee_records');
|
||||
}).as('employee_records');
|
||||
});
|
||||
@ -163,6 +164,7 @@ context('Organizational Chart Mobile', () => {
|
||||
});
|
||||
|
||||
it('goes to the respective level after clicking on non-collapsed sibling group', () => {
|
||||
cy.get('@employee_records').then(() => {
|
||||
// click on non-collapsed sibling group
|
||||
cy.get('.hierarchy-mobile')
|
||||
.prev()
|
||||
@ -171,6 +173,7 @@ context('Organizational Chart Mobile', () => {
|
||||
// should take you to that level
|
||||
cy.get('.hierarchy-mobile').find('li.level .node-card').should('have.length', 2);
|
||||
});
|
||||
});
|
||||
|
||||
it('edit node navigates to employee master', () => {
|
||||
cy.get('@employee_records').then(employee_records => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user