diff --git a/tests/unit/InitialSettingPageTest.tsx b/tests/unit/InitialSettingPageTest.tsx index 5a93e588deb4..c8fe13b7e2e9 100644 --- a/tests/unit/InitialSettingPageTest.tsx +++ b/tests/unit/InitialSettingPageTest.tsx @@ -4,7 +4,6 @@ import Onyx from 'react-native-onyx'; import {act} from 'react-test-renderer'; import * as Localize from '@libs/Localize'; import App from '@src/App'; -import OnyxUpdateManager from '@src/libs/actions/OnyxUpdateManager'; import ONYXKEYS from '@src/ONYXKEYS'; import type {NativeNavigationMock} from '../../__mocks__/@react-navigation/native'; import PusherHelper from '../utils/PusherHelper'; @@ -24,9 +23,9 @@ TestHelper.setupGlobalFetchMock(); function navigateToSetting() { const hintText = Localize.translateLocal('sidebarScreen.buttonMySettings'); - const reportHeaderBackButton = screen.queryByAccessibilityHint(hintText); - if (reportHeaderBackButton) { - fireEvent(reportHeaderBackButton, 'press'); + const mySettingButton = screen.queryByAccessibilityHint(hintText); + if (mySettingButton) { + fireEvent(mySettingButton, 'press'); } return waitForBatchedUpdatesWithAct(); } @@ -66,8 +65,6 @@ function signInAppAndEnterTestFlow(dismissedValue?: boolean): Promise { }); } -OnyxUpdateManager(); - describe('Switch to Expensify Classic flow', () => { beforeEach(() => { jest.clearAllMocks();