@@ -12,6 +12,7 @@ import * as ReportActionsUtils from '../../src/libs/ReportActionsUtils';
1212import { getCardIssuedMessage , getOneTransactionThreadReportID , getOriginalMessage , getSendMoneyFlowAction , isIOUActionMatchingTransactionList } from '../../src/libs/ReportActionsUtils' ;
1313import ONYXKEYS from '../../src/ONYXKEYS' ;
1414import type { Card , OriginalMessageIOU , Report , ReportAction , ReportActions } from '../../src/types/onyx' ;
15+ import createRandomPolicy from '../utils/collections/policies' ;
1516import createRandomReportAction from '../utils/collections/reportActions' ;
1617import { createRandomReport } from '../utils/collections/reports' ;
1718import * as LHNTestUtils from '../utils/LHNTestUtils' ;
@@ -1433,6 +1434,14 @@ describe('ReportActionsUtils', () => {
14331434 const actual = ReportActionsUtils . shouldReportActionBeVisible ( reportAction , reportAction . reportActionID , true ) ;
14341435 expect ( actual ) . toBe ( true ) ;
14351436 } ) ;
1437+
1438+ it ( "should return false for concierge categorize suggestion whisper message when the policy's category feature is disabled" , ( ) => {
1439+ const reportAction : ReportAction = { ...createRandomReportAction ( 123 ) , actionName : CONST . REPORT . ACTIONS . TYPE . CONCIERGE_CATEGORY_OPTIONS } ;
1440+ const categoryFeatureDisabledPolicy = { ...createRandomPolicy ( 1234 ) , areCategoriesEnabled : false } ;
1441+
1442+ const result = ReportActionsUtils . shouldReportActionBeVisible ( reportAction , reportAction . reportActionID , true , categoryFeatureDisabledPolicy ) ;
1443+ expect ( result ) . toBe ( false ) ;
1444+ } ) ;
14361445 } ) ;
14371446
14381447 describe ( 'getPolicyChangeLogUpdateEmployee' , ( ) => {
0 commit comments