File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6608,6 +6608,7 @@ describe('actions/IOU', () => {
66086608 let updatedTransaction : OnyxEntry < Transaction > ;
66096609 let updatedIOUReportActionOnSelfDMReport : OnyxEntry < ReportAction > ;
66106610 let updatedTrackExpenseActionableWhisper : OnyxEntry < ReportAction > ;
6611+ let updatedExpenseReport : OnyxEntry < Report > ;
66116612
66126613 await getOnyxData ( {
66136614 key : ONYXKEYS . COLLECTION . TRANSACTION ,
@@ -6630,9 +6631,20 @@ describe('actions/IOU', () => {
66306631 } ,
66316632 } ) ;
66326633
6634+ await getOnyxData ( {
6635+ key : ONYXKEYS . COLLECTION . REPORT ,
6636+ waitForCollectionCallback : true ,
6637+ callback : ( allReports ) => {
6638+ updatedExpenseReport = Object . values ( allReports ?? { } ) . find ( ( r ) => r ?. reportID === expenseReport ?. reportID ) ;
6639+ } ,
6640+ } ) ;
6641+
66336642 expect ( updatedTransaction ?. reportID ) . toBe ( expenseReport ?. reportID ) ;
66346643 expect ( isMoneyRequestAction ( updatedIOUReportActionOnSelfDMReport ) ? getOriginalMessage ( updatedIOUReportActionOnSelfDMReport ) ?. IOUTransactionID : undefined ) . toBe ( undefined ) ;
66356644 expect ( updatedTrackExpenseActionableWhisper ) . toBe ( undefined ) ;
6645+ expect ( updatedExpenseReport ?. nonReimbursableTotal ) . toBe ( - amount ) ;
6646+ expect ( updatedExpenseReport ?. total ) . toBe ( - amount ) ;
6647+ expect ( updatedExpenseReport ?. unheldNonReimbursableTotal ) . toBe ( - amount ) ;
66366648 } ) ;
66376649
66386650 describe ( 'saveSplitTransactions' , ( ) => {
You can’t perform that action at this time.
0 commit comments