@@ -15,7 +15,6 @@ import { backgroundState } from '../../../../util/test/initial-root-state';
1515import TabBar from './TabBar' ;
1616import { TabBarIconKey , ExtendedBottomTabDescriptor } from './TabBar.types' ;
1717import Routes from '../../../../constants/navigation/Routes' ;
18- import { useAccountMenuEnabled } from '../../../../selectors/featureFlagController/accountMenu/useAccountMenuEnabled' ;
1918
2019// Minimal descriptor interface for tests - only includes what TabBar component uses
2120interface TestTabDescriptor {
@@ -30,14 +29,6 @@ interface TestDescriptors {
3029 [ key : string ] : TestTabDescriptor ;
3130}
3231
33- // Mock account menu feature flag hook
34- jest . mock (
35- '../../../../selectors/featureFlagController/accountMenu/useAccountMenuEnabled' ,
36- ( ) => ( {
37- useAccountMenuEnabled : jest . fn ( ( ) => false ) ,
38- } ) ,
39- ) ;
40-
4132// Mock the navigation object with proper typing
4233const navigation : NavigationHelpers < ParamListBase > = {
4334 navigate : jest . fn ( ) ,
@@ -129,10 +120,7 @@ describe('TabBar', () => {
129120 expect ( toJSON ( ) ) . toMatchSnapshot ( ) ;
130121 } ) ;
131122
132- it ( 'navigates to the correct screen when a tab is pressed and account menu is disabled' , ( ) => {
133- // Explicitly disable the account menu feature flag for this test
134- jest . mocked ( useAccountMenuEnabled ) . mockReturnValue ( false ) ;
135-
123+ it ( 'navigates to the correct screen when a tab is pressed' , ( ) => {
136124 const { getByTestId } = renderWithProvider (
137125 < TabBar
138126 state = { state as TabNavigationState < ParamListBase > }
@@ -168,7 +156,7 @@ describe('TabBar', () => {
168156
169157 fireEvent . press ( getByTestId ( `tab-bar-item-${ TabBarIconKey . Setting } ` ) ) ;
170158 expect ( navigation . navigate ) . toHaveBeenCalledWith ( Routes . SETTINGS_VIEW , {
171- screen : 'Settings' ,
159+ screen : Routes . ACCOUNTS_MENU_VIEW ,
172160 } ) ;
173161 } ) ;
174162
@@ -230,23 +218,4 @@ describe('TabBar', () => {
230218 fireEvent . press ( getByTestId ( `tab-bar-item-${ TabBarIconKey . Trending } ` ) ) ;
231219 expect ( navigation . navigate ) . toHaveBeenCalledWith ( Routes . TRENDING_VIEW ) ;
232220 } ) ;
233-
234- it ( 'navigates to Accounts Menu when settings tab is pressed and account menu is enabled' , ( ) => {
235- // Enable the account menu feature flag for this test
236- jest . mocked ( useAccountMenuEnabled ) . mockReturnValue ( true ) ;
237-
238- const { getByTestId } = renderWithProvider (
239- < TabBar
240- state = { state as TabNavigationState < ParamListBase > }
241- descriptors = { descriptors as Record < string , ExtendedBottomTabDescriptor > }
242- navigation = { navigation }
243- /> ,
244- { state : mockInitialState } ,
245- ) ;
246-
247- fireEvent . press ( getByTestId ( `tab-bar-item-${ TabBarIconKey . Setting } ` ) ) ;
248- expect ( navigation . navigate ) . toHaveBeenCalledWith ( Routes . SETTINGS_VIEW , {
249- screen : Routes . ACCOUNTS_MENU_VIEW ,
250- } ) ;
251- } ) ;
252221} ) ;
0 commit comments