diff --git a/tests/ui/PaginationTest.tsx b/tests/ui/PaginationTest.tsx index 2fcc9f1fabf4..071e631b339d 100644 --- a/tests/ui/PaginationTest.tsx +++ b/tests/ui/PaginationTest.tsx @@ -17,6 +17,7 @@ import PusherHelper from '../utils/PusherHelper'; import * as TestHelper from '../utils/TestHelper'; import waitForBatchedUpdates from '../utils/waitForBatchedUpdates'; import waitForBatchedUpdatesWithAct from '../utils/waitForBatchedUpdatesWithAct'; +import waitForNetworkPromises from '../utils/waitForNetworkPromises'; // We need a large timeout here as we are lazy loading React Navigation screens and this test is running against the entire mounted App jest.setTimeout(60000); @@ -319,7 +320,7 @@ describe('Pagination', () => { TestHelper.expectAPICommandToHaveBeenCalledWith('GetOlderActions', 0, {reportID: REPORT_ID, reportActionID: '4'}); TestHelper.expectAPICommandToHaveBeenCalled('GetNewerActions', 0); - await waitForBatchedUpdatesWithAct(); + await waitForNetworkPromises(); // We now have 18 messages. 15 (MIN_INITIAL_REPORT_ACTION_COUNT) from the initial OpenReport and 3 from GetOlderActions. // GetOlderActions only returns 3 actions since it reaches id '1', which is the created action.