@@ -1485,7 +1485,7 @@ describe('ReportActionsUtils', () => {
14851485 const res = ReportActionsUtils . shouldShowAddMissingDetails ( CONST . REPORT . ACTIONS . TYPE . CARD_MISSING_ADDRESS , mockPersonalDetail ) ;
14861486 expect ( res ) . toEqual ( true ) ;
14871487 } ) ;
1488- it ( 'should return false if personal detail is completed' , ( ) => {
1488+ it ( 'should still return true when personal detail is completed but has not been confirmed yet ' , ( ) => {
14891489 const mockPersonalDetail = {
14901490 addresses : [
14911491 {
@@ -1500,7 +1500,27 @@ describe('ReportActionsUtils', () => {
15001500 phoneNumber : '+162992973' ,
15011501 dob : '9-9-2000' ,
15021502 } ;
1503- const res = ReportActionsUtils . shouldShowAddMissingDetails ( CONST . REPORT . ACTIONS . TYPE . CARD_MISSING_ADDRESS , mockPersonalDetail ) ;
1503+ const cardState = CONST . EXPENSIFY_CARD . STATE . STATE_NOT_ISSUED ;
1504+ const res = ReportActionsUtils . shouldShowAddMissingDetails ( CONST . REPORT . ACTIONS . TYPE . CARD_MISSING_ADDRESS , mockPersonalDetail , cardState ) ;
1505+ expect ( res ) . toEqual ( true ) ;
1506+ } ) ;
1507+ it ( 'should return false if personal detail is completed and has been confirmed by the user' , ( ) => {
1508+ const mockPersonalDetail = {
1509+ addresses : [
1510+ {
1511+ street : '123 Main St' ,
1512+ city : 'New York' ,
1513+ state : 'NY' ,
1514+ postalCode : '10001' ,
1515+ } ,
1516+ ] ,
1517+ legalFirstName : 'John' ,
1518+ legalLastName : 'David' ,
1519+ phoneNumber : '+162992973' ,
1520+ dob : '9-9-2000' ,
1521+ } ;
1522+ const cardState = CONST . EXPENSIFY_CARD . STATE . NOT_ACTIVATED ;
1523+ const res = ReportActionsUtils . shouldShowAddMissingDetails ( CONST . REPORT . ACTIONS . TYPE . CARD_MISSING_ADDRESS , mockPersonalDetail , cardState ) ;
15041524 expect ( res ) . toEqual ( false ) ;
15051525 } ) ;
15061526 } ) ;
0 commit comments