File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1120,6 +1120,28 @@ describe('OptionsListUtils', () => {
11201120 expect ( results . personalDetails ) . not . toEqual ( expect . arrayContaining ( [ expect . objectContaining ( { login : 'concierge@expensify.com' } ) ] ) ) ;
11211121 } ) ;
11221122
1123+ it ( 'should pass conciergeReportID through to options when provided' , ( ) => {
1124+ // Given a set of reports that includes Concierge and a valid conciergeReportID
1125+ const conciergeReportID = '11' ;
1126+ // When we call getValidOptions() with a conciergeReportID
1127+ const results = getValidOptions (
1128+ { reports : OPTIONS_WITH_CONCIERGE . reports , personalDetails : OPTIONS_WITH_CONCIERGE . personalDetails } ,
1129+ allPolicies ,
1130+ { } ,
1131+ nvpDismissedProductTraining ,
1132+ loginList ,
1133+ CURRENT_USER_ACCOUNT_ID ,
1134+ CURRENT_USER_EMAIL ,
1135+ conciergeReportID ,
1136+ ) ;
1137+
1138+ // Then the result should still include Concierge in the results
1139+ expect ( results . recentReports ) . toEqual ( expect . arrayContaining ( [ expect . objectContaining ( { login : 'concierge@expensify.com' } ) ] ) ) ;
1140+ // And the concierge report should have a valid reportID
1141+ const conciergeOption = results . recentReports . find ( ( option ) => option . login === 'concierge@expensify.com' ) ;
1142+ expect ( conciergeOption ?. reportID ) . toBe ( conciergeReportID ) ;
1143+ } ) ;
1144+
11231145 it ( 'should exclude Chronos when excludedLogins is specified' , ( ) => {
11241146 // Given a set of reports and personalDetails that includes Chronos and a config object that excludes Chronos
11251147 // When we call getValidOptions()
You can’t perform that action at this time.
0 commit comments