Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Oct 23, 2024
1 parent 1134283 commit 3f8fe77
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tests/unit/WorkflowUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ describe('WorkflowUtils', () => {
const convertedEmployees = WorkflowUtils.convertApprovalWorkflowToPolicyEmployees({previousEmployeeList: {}, approvalWorkflow, type: 'create'});

expect(convertedEmployees).toEqual({
'[email protected]': buildPolicyEmployee(1, {forwardsTo: '', submitsTo: '[email protected]'}),
'[email protected]': buildPolicyEmployee(2, {submitsTo: '[email protected]'}),
'[email protected]': buildPolicyEmployee(1, {forwardsTo: '', submitsTo: '[email protected]', pendingFields: {submitsTo: 'add'}}),
'[email protected]': buildPolicyEmployee(2, {submitsTo: '[email protected]', pendingFields: {submitsTo: 'add'}}),
});
});

Expand All @@ -412,12 +412,12 @@ describe('WorkflowUtils', () => {
const convertedEmployees = WorkflowUtils.convertApprovalWorkflowToPolicyEmployees({previousEmployeeList: {}, approvalWorkflow, type: 'create'});

expect(convertedEmployees).toEqual({
'[email protected]': buildPolicyEmployee(1, {forwardsTo: '[email protected]'}),
'[email protected]': buildPolicyEmployee(2, {forwardsTo: '[email protected]'}),
'[email protected]': buildPolicyEmployee(3, {forwardsTo: ''}),
'[email protected]': buildPolicyEmployee(4, {submitsTo: '[email protected]'}),
'[email protected]': buildPolicyEmployee(5, {submitsTo: '[email protected]'}),
'[email protected]': buildPolicyEmployee(6, {submitsTo: '[email protected]'}),
'[email protected]': buildPolicyEmployee(1, {forwardsTo: '[email protected]', pendingFields: {forwardsTo: 'add'}}),
'[email protected]': buildPolicyEmployee(2, {forwardsTo: '[email protected]', pendingFields: {forwardsTo: 'add'}}),
'[email protected]': buildPolicyEmployee(3, {forwardsTo: '', pendingFields: {forwardsTo: 'add'}}),
'[email protected]': buildPolicyEmployee(4, {submitsTo: '[email protected]', pendingFields: {submitsTo: 'add'}}),
'[email protected]': buildPolicyEmployee(5, {submitsTo: '[email protected]', pendingFields: {submitsTo: 'add'}}),
'[email protected]': buildPolicyEmployee(6, {submitsTo: '[email protected]', pendingFields: {submitsTo: 'add'}}),
});
});

Expand All @@ -431,12 +431,12 @@ describe('WorkflowUtils', () => {
const convertedEmployees = WorkflowUtils.convertApprovalWorkflowToPolicyEmployees({previousEmployeeList: {}, approvalWorkflow, type: 'remove'});

expect(convertedEmployees).toEqual({
'[email protected]': buildPolicyEmployee(1, {forwardsTo: '', pendingAction: 'update'}),
'[email protected]': buildPolicyEmployee(2, {forwardsTo: '', pendingAction: 'update'}),
'[email protected]': buildPolicyEmployee(3, {forwardsTo: '', pendingAction: 'update'}),
'[email protected]': buildPolicyEmployee(4, {submitsTo: '', pendingAction: 'update'}),
'[email protected]': buildPolicyEmployee(5, {submitsTo: '', pendingAction: 'update'}),
'[email protected]': buildPolicyEmployee(6, {submitsTo: '', pendingAction: 'update'}),
'[email protected]': buildPolicyEmployee(1, {forwardsTo: '', pendingAction: 'update', pendingFields: {forwardsTo: 'update'}}),
'[email protected]': buildPolicyEmployee(2, {forwardsTo: '', pendingAction: 'update', pendingFields: {forwardsTo: 'update'}}),
'[email protected]': buildPolicyEmployee(3, {forwardsTo: '', pendingAction: 'update', pendingFields: {forwardsTo: 'update'}}),
'[email protected]': buildPolicyEmployee(4, {submitsTo: '', pendingAction: 'update', pendingFields: {submitsTo: 'update'}}),
'[email protected]': buildPolicyEmployee(5, {submitsTo: '', pendingAction: 'update', pendingFields: {submitsTo: 'update'}}),
'[email protected]': buildPolicyEmployee(6, {submitsTo: '', pendingAction: 'update', pendingFields: {submitsTo: 'update'}}),
});
});
});
Expand Down

0 comments on commit 3f8fe77

Please sign in to comment.