@@ -1284,62 +1284,6 @@ describe('ReportActionsUtils', () => {
12841284 } ) ;
12851285
12861286 describe ( 'getReportActionMessageFragments' , ( ) => {
1287- it ( 'should return the correct fragment for the REIMBURSED action' , ( ) => {
1288- const action = {
1289- actionName : CONST . REPORT . ACTIONS . TYPE . REIMBURSED ,
1290- reportActionID : '1' ,
1291- created : '1' ,
1292- message : [
1293- {
1294- type : 'TEXT' ,
1295- style : 'strong' ,
1296- text : 'Concierge' ,
1297- } ,
1298- {
1299- type : 'TEXT' ,
1300- style : 'normal' ,
1301- text : ' reimbursed this report' ,
1302- } ,
1303- {
1304- type : 'TEXT' ,
1305- style : 'normal' ,
1306- text : ' on behalf of you' ,
1307- } ,
1308- {
1309- type : 'TEXT' ,
1310- style : 'normal' ,
1311- text : ' from the bank account ending in 1111' ,
1312- } ,
1313- {
1314- type : 'TEXT' ,
1315- style : 'normal' ,
1316- text : '. Money is on its way to your bank account ending in 0000. Reimbursement estimated to complete on Dec 16.' ,
1317- } ,
1318- ] ,
1319- } ;
1320- const expectedMessage = ReportActionsUtils . getReimbursedMessage ( translateLocal , action , undefined , 0 ) ;
1321- const expectedFragments = ReportActionsUtils . getReportActionMessageFragments ( translateLocal , action ) ;
1322- expect ( expectedFragments ) . toEqual ( [ { text : expectedMessage , html : `<muted-text>${ expectedMessage } </muted-text>` , type : 'COMMENT' } ] ) ;
1323- } ) ;
1324-
1325- it ( 'should translate the REIMBURSED action using originalMessage.method when paymentMethod is absent (Pusher path)' , ( ) => {
1326- // Given a REIMBURSED action that arrived via Pusher with only `method` set (as Auth stores it)
1327- const action : ReportAction < typeof CONST . REPORT . ACTIONS . TYPE . REIMBURSED > = {
1328- actionName : CONST . REPORT . ACTIONS . TYPE . REIMBURSED ,
1329- reportActionID : '2' ,
1330- created : '2024-01-01' ,
1331- originalMessage : {
1332- method : 'Check' ,
1333- } ,
1334- } ;
1335- // When we get the message fragments
1336- const fragments = ReportActionsUtils . getReportActionMessageFragments ( translateLocal , action ) ;
1337- // Then the translated message is used (not raw backend text)
1338- const expectedMessage = ReportActionsUtils . getReimbursedMessage ( translateLocal , action , undefined , 0 ) ;
1339- expect ( fragments ) . toEqual ( [ { text : expectedMessage , html : `<muted-text>${ expectedMessage } </muted-text>` , type : 'COMMENT' } ] ) ;
1340- expect ( expectedMessage ) . toContain ( 'check' ) ;
1341- } ) ;
1342-
13431287 it ( 'should return the correct fragment for the DYNAMIC_EXTERNAL_WORKFLOW_ROUTED action' , ( ) => {
13441288 // Given a DYNAMIC_EXTERNAL_WORKFLOW_ROUTED action
13451289 const action : ReportAction < typeof CONST . REPORT . ACTIONS . TYPE . DYNAMIC_EXTERNAL_WORKFLOW_ROUTED > = {
0 commit comments