@@ -1223,62 +1223,6 @@ describe('ReportActionsUtils', () => {
12231223 } ) ;
12241224
12251225 describe ( 'getReportActionMessageFragments' , ( ) => {
1226- it ( 'should return the correct fragment for the REIMBURSED action' , ( ) => {
1227- const action = {
1228- actionName : CONST . REPORT . ACTIONS . TYPE . REIMBURSED ,
1229- reportActionID : '1' ,
1230- created : '1' ,
1231- message : [
1232- {
1233- type : 'TEXT' ,
1234- style : 'strong' ,
1235- text : 'Concierge' ,
1236- } ,
1237- {
1238- type : 'TEXT' ,
1239- style : 'normal' ,
1240- text : ' reimbursed this report' ,
1241- } ,
1242- {
1243- type : 'TEXT' ,
1244- style : 'normal' ,
1245- text : ' on behalf of you' ,
1246- } ,
1247- {
1248- type : 'TEXT' ,
1249- style : 'normal' ,
1250- text : ' from the bank account ending in 1111' ,
1251- } ,
1252- {
1253- type : 'TEXT' ,
1254- style : 'normal' ,
1255- text : '. Money is on its way to your bank account ending in 0000. Reimbursement estimated to complete on Dec 16.' ,
1256- } ,
1257- ] ,
1258- } ;
1259- const expectedMessage = ReportActionsUtils . getReimbursedMessage ( translateLocal , action , undefined , 0 ) ;
1260- const expectedFragments = ReportActionsUtils . getReportActionMessageFragments ( translateLocal , action ) ;
1261- expect ( expectedFragments ) . toEqual ( [ { text : expectedMessage , html : `<muted-text>${ expectedMessage } </muted-text>` , type : 'COMMENT' } ] ) ;
1262- } ) ;
1263-
1264- it ( 'should translate the REIMBURSED action using originalMessage.method when paymentMethod is absent (Pusher path)' , ( ) => {
1265- // Given a REIMBURSED action that arrived via Pusher with only `method` set (as Auth stores it)
1266- const action : ReportAction < typeof CONST . REPORT . ACTIONS . TYPE . REIMBURSED > = {
1267- actionName : CONST . REPORT . ACTIONS . TYPE . REIMBURSED ,
1268- reportActionID : '2' ,
1269- created : '2024-01-01' ,
1270- originalMessage : {
1271- method : 'Check' ,
1272- } ,
1273- } ;
1274- // When we get the message fragments
1275- const fragments = ReportActionsUtils . getReportActionMessageFragments ( translateLocal , action ) ;
1276- // Then the translated message is used (not raw backend text)
1277- const expectedMessage = ReportActionsUtils . getReimbursedMessage ( translateLocal , action , undefined , 0 ) ;
1278- expect ( fragments ) . toEqual ( [ { text : expectedMessage , html : `<muted-text>${ expectedMessage } </muted-text>` , type : 'COMMENT' } ] ) ;
1279- expect ( expectedMessage ) . toContain ( 'check' ) ;
1280- } ) ;
1281-
12821226 it ( 'should return the correct fragment for the DYNAMIC_EXTERNAL_WORKFLOW_ROUTED action' , ( ) => {
12831227 // Given a DYNAMIC_EXTERNAL_WORKFLOW_ROUTED action
12841228 const action : ReportAction < typeof CONST . REPORT . ACTIONS . TYPE . DYNAMIC_EXTERNAL_WORKFLOW_ROUTED > = {
0 commit comments