diff --git a/src/app/core/mock-data/transaction.data.ts b/src/app/core/mock-data/transaction.data.ts index f1e1b7579f..e6b512e8ed 100644 --- a/src/app/core/mock-data/transaction.data.ts +++ b/src/app/core/mock-data/transaction.data.ts @@ -2628,6 +2628,8 @@ export const transformedExpensePayload: Partial = deepFreezeStrict({ commute_details_id: undefined, hotel_is_breakfast_provided: null, file_ids: undefined, + mileage_calculated_distance: null, + mileage_calculated_amount: null, }); export const splitExpenseTxn2: Transaction = deepFreeze({ diff --git a/src/app/core/services/platform/v1/spender/expenses.service.ts b/src/app/core/services/platform/v1/spender/expenses.service.ts index cb369daa6e..5a696ddd2c 100644 --- a/src/app/core/services/platform/v1/spender/expenses.service.ts +++ b/src/app/core/services/platform/v1/spender/expenses.service.ts @@ -326,6 +326,8 @@ export class ExpensesService { file_ids: transaction.file_ids, report_id: transaction.report_id, travel_classes: [], + mileage_calculated_distance: transaction.mileage_calculated_distance, + mileage_calculated_amount: transaction.mileage_calculated_amount, }; if ( diff --git a/src/app/fyle/view-team-report/view-team-report.page.spec.ts b/src/app/fyle/view-team-report/view-team-report.page.spec.ts index 70f727b2f7..dce24925e5 100644 --- a/src/app/fyle/view-team-report/view-team-report.page.spec.ts +++ b/src/app/fyle/view-team-report/view-team-report.page.spec.ts @@ -1,6 +1,6 @@ import { CurrencyPipe } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, EventEmitter } from '@angular/core'; -import { ComponentFixture, TestBed, fakeAsync, tick, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, TestBed, fakeAsync, flush, tick, waitForAsync } from '@angular/core/testing'; import { FormsModule } from '@angular/forms'; import { MatSnackBar } from '@angular/material/snack-bar'; import { By } from '@angular/platform-browser'; @@ -588,7 +588,6 @@ describe('ViewTeamReportPageV2', () => { component.report$ = of(reportWithExpenses); component.expenses$ = of(expenseResponseData); launchDarklyService.getVariation.and.returnValue(of(true)); - fixture.detectChanges(); component.approveReport(); tick(1000); @@ -653,7 +652,6 @@ describe('ViewTeamReportPageV2', () => { component.report$ = of(reportWithExpenses); component.expenses$ = of(expenseResponseData); - fixture.detectChanges(); component.approveReport(); tick(); @@ -679,7 +677,6 @@ describe('ViewTeamReportPageV2', () => { component.report$ = of(reportWithExpenses); component.expenses$ = of(expenseResponseData); - fixture.detectChanges(); component.approveReport(); tick(); @@ -704,7 +701,6 @@ describe('ViewTeamReportPageV2', () => { component.report$ = of(reportWithExpenses); component.expenses$ = of(expenseResponseData); - fixture.detectChanges(); component.approveReport(); tick();