Skip to content

Commit

Permalink
Merge branch 'FYLE-86cuxuafw-2-test-fixes' of github.com:fylein/fyle-…
Browse files Browse the repository at this point in the history
…mobile-app into FYLE-86cuxuafw-2-test-fixes
  • Loading branch information
bistaastha committed Apr 16, 2024
2 parents b9b29c2 + 24df018 commit 8e9183e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/app/core/services/advance-request.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export class AdvanceRequestService {
}

mapAdvanceRequest(advanceRequestPlatform: AdvanceRequestPlatform): ExtendedAdvanceRequestPublic {
console.log(advanceRequestPlatform.state === AdvanceRequestState.SENT_BACK);
return {
areq_advance_request_number: advanceRequestPlatform.seq_num,
areq_advance_id: advanceRequestPlatform.advance_id,
Expand All @@ -107,7 +106,7 @@ export class AdvanceRequestService {
advanceRequestPlatform.employee.department && advanceRequestPlatform.employee.department.sub_department,
us_email: advanceRequestPlatform.user.email,
us_full_name: advanceRequestPlatform.user.full_name,
areq_is_pulled_back: advanceRequestPlatform.state === 'PULLED_BACK',
areq_is_pulled_back: advanceRequestPlatform.state === AdvanceRequestState.PULLED_BACK,
ou_employee_id: advanceRequestPlatform.employee_id,
areq_custom_field_values: advanceRequestPlatform.custom_fields,
areq_is_sent_back: advanceRequestPlatform.state === AdvanceRequestState.SENT_BACK,
Expand Down
6 changes: 3 additions & 3 deletions src/app/fyle/my-advances/my-advances.page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ describe('MyAdvancesPage', () => {

it('should set myAdvancerequests$ to publicAdvanceRequestRes2.data in form of array in case if count is greater than 200', () => {
advanceRequestService.getSpenderAdvanceRequests.and.returnValues(
of(publicAdvanceRequestResSentBack),
of(publicAdvanceRequestResSentBack)
of(publicAdvanceRequestRes2),
of(publicAdvanceRequestRes2)
);
advanceRequestService.getSpenderAdvanceRequestsCount.and.returnValue(of(201));
component.ionViewWillEnter();
Expand All @@ -273,7 +273,7 @@ describe('MyAdvancesPage', () => {
order: 'created_at.desc,id.desc',
},
});
expect(res).toEqual([...publicAdvanceRequestResSentBack.data, ...publicAdvanceRequestResSentBack.data]);
expect(res).toEqual([...publicAdvanceRequestRes2.data, ...publicAdvanceRequestRes2.data]);
});
});

Expand Down
1 change: 0 additions & 1 deletion src/app/fyle/my-advances/my-advances.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ export class MyAdvancesPage implements AfterViewChecked {
return sentBackAdvance || plainDraft;
});
}
console.log('new', newArr);
newArr = this.utilityService.sortAllAdvances(filters.sortDir, filters.sortParam, newArr);
return newArr;
})
Expand Down

0 comments on commit 8e9183e

Please sign in to comment.