@@ -41,7 +41,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
4141import ROUTES from '@src/ROUTES' ;
4242import type * as OnyxTypes from '@src/types/onyx' ;
4343import type { CustomCardFeedData } from '@src/types/onyx/CardFeeds' ;
44- import type Policy from '@src/types/onyx/Policy' ;
4544import type { Connections } from '@src/types/onyx/Policy' ;
4645import type { SearchDataTypes } from '@src/types/onyx/SearchResults' ;
4746import getOnyxValue from '../../utils/getOnyxValue' ;
@@ -8279,15 +8278,13 @@ describe('SearchUIUtils', () => {
82798278 taxCode : undefined ,
82808279 taxAmount : undefined ,
82818280 } ;
8282- const taxEnabledPolicy = { ...policy , tax : { trackingEnabled : true } } as unknown as Policy ;
8283-
82848281 const visibleColumns = [ CONST . SEARCH . TABLE_COLUMNS . DATE , CONST . SEARCH . TABLE_COLUMNS . TAX_RATE , CONST . SEARCH . TABLE_COLUMNS . TAX_AMOUNT , CONST . SEARCH . TABLE_COLUMNS . TOTAL_AMOUNT ] ;
82858282 const columns = SearchUIUtils . getColumnsToShow ( {
82868283 currentAccountID : submitterAccountID ,
82878284 data : [ legacyTransaction ] ,
82888285 visibleColumns,
82898286 isExpenseReportView : true ,
8290- policy : taxEnabledPolicy ,
8287+ isPolicyTaxEnabled : true ,
82918288 } ) ;
82928289
82938290 expect ( columns ) . toContain ( CONST . SEARCH . TABLE_COLUMNS . TAX_RATE ) ;
@@ -8307,15 +8304,13 @@ describe('SearchUIUtils', () => {
83078304 taxCode : undefined ,
83088305 taxAmount : undefined ,
83098306 } ;
8310- const taxEnabledPolicy = { ...policy , tax : { trackingEnabled : true } } as unknown as Policy ;
8311-
83128307 const visibleColumns = [ CONST . SEARCH . TABLE_COLUMNS . DATE , CONST . SEARCH . TABLE_COLUMNS . MERCHANT , CONST . SEARCH . TABLE_COLUMNS . TOTAL_AMOUNT ] ;
83138308 const columns = SearchUIUtils . getColumnsToShow ( {
83148309 currentAccountID : submitterAccountID ,
83158310 data : [ legacyTransaction ] ,
83168311 visibleColumns,
83178312 isExpenseReportView : true ,
8318- policy : taxEnabledPolicy ,
8313+ isPolicyTaxEnabled : true ,
83198314 } ) ;
83208315
83218316 expect ( columns ) . not . toContain ( CONST . SEARCH . TABLE_COLUMNS . TAX_RATE ) ;
@@ -8333,15 +8328,13 @@ describe('SearchUIUtils', () => {
83338328 taxCode : undefined ,
83348329 taxAmount : undefined ,
83358330 } ;
8336- const taxDisabledPolicy = { ...policy , tax : { trackingEnabled : false } } as unknown as Policy ;
8337-
83388331 const visibleColumns = [ CONST . SEARCH . TABLE_COLUMNS . DATE , CONST . SEARCH . TABLE_COLUMNS . TAX_RATE , CONST . SEARCH . TABLE_COLUMNS . TAX_AMOUNT , CONST . SEARCH . TABLE_COLUMNS . TOTAL_AMOUNT ] ;
83398332 const columns = SearchUIUtils . getColumnsToShow ( {
83408333 currentAccountID : submitterAccountID ,
83418334 data : [ legacyTransaction ] ,
83428335 visibleColumns,
83438336 isExpenseReportView : true ,
8344- policy : taxDisabledPolicy ,
8337+ isPolicyTaxEnabled : false ,
83458338 } ) ;
83468339
83478340 expect ( columns ) . not . toContain ( CONST . SEARCH . TABLE_COLUMNS . TAX_RATE ) ;
0 commit comments