Skip to content

Commit

Permalink
apply leave fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Chamara Abesinghe committed Sep 13, 2022
1 parent acbb6e5 commit 7ab40e7
Showing 1 changed file with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,9 @@ describe('Leave - Apply Leave', function () {
cy.getOXDInput('Entitlement').type('5');
cy.getOXD('button').contains('Save').click();
});
cy.get(
':nth-child(6) > .oxd-form-actions > .oxd-button--secondary',
).click();
cy.wait('@saveLeaveEntitlements').then(function () {
cy.task('db:snapshot', {name: 'leaveEntitlements'});
});
cy.getOXD('button').contains('Confirm').click();
cy.wait('@saveLeaveEntitlements');
cy.task('db:snapshot', {name: 'leaveEntitlements'});
});
});

Expand Down Expand Up @@ -148,17 +145,15 @@ describe('Leave - Apply Leave', function () {
cy.task('db:restore', {name: 'ESSUser'});
cy.loginTo(user.admin, '/leave/addLeaveEntitlement');
cy.getOXD('form').within(() => {
cy.getOXDInput('Employee Name')
.type('John')
.selectOption('John Perera');
cy.getOXDInput('Employee Name').type('John');
cy.getOXD('autoCompleteOption').contains('John Perera').click();
cy.getOXDInput('Leave Type').selectOption('Casual Leave');
cy.getOXDInput('Entitlement').type('5');
cy.getOXD('button').contains('Save').click();
});
cy.get('.orangehrm-modal-footer > .oxd-button--secondary').click();
cy.wait('@saveLeaveEntitlements').then(function () {
cy.task('db:snapshot', {name: 'ESSleaveEntitlements'});
});
cy.getOXD('button').contains('Confirm').click();
cy.wait('@saveLeaveEntitlements');
cy.task('db:snapshot', {name: 'ESSleaveEntitlements'});
});
});

Expand Down

0 comments on commit 7ab40e7

Please sign in to comment.