Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"react-native-modal": "^13.0.0",
"react-native-nitro-modules": "0.26.2",
"react-native-nitro-sqlite": "9.1.10",
"react-native-onyx": "2.0.127",
"react-native-onyx": "github:Expensify/react-native-onyx#0bc59bb8b764628175d65f8da39cc4076d4d26d1",
"react-native-pager-view": "6.5.3",
"react-native-pdf": "6.7.3",
"react-native-performance": "^5.1.4",
Expand Down
7 changes: 5 additions & 2 deletions tests/ui/PaginationTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ async function navigateToSidebarOption(reportID: string): Promise<void> {
(NativeNavigation as NativeNavigationMock).triggerTransitionEnd();
});
// ReportScreen relies on the onLayout event to receive updates from onyx.
triggerListLayout(reportID);
await waitForBatchedUpdatesWithAct();
triggerListLayout(reportID);
}

function buildCreatedAction(reportActionID: string, created: string) {
Expand Down Expand Up @@ -323,7 +323,9 @@ describe('Pagination', () => {

// 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.
expect(getReportActions()).toHaveLength(18);
await waitFor(() => {
expect(getReportActions()).toHaveLength(18);
});
});

it('opens a chat and load newer messages', async () => {
Expand All @@ -340,6 +342,7 @@ describe('Pagination', () => {
});
// Due to https://github.com/facebook/react-native/commit/3485e9ed871886b3e7408f90d623da5c018da493
// we need to scroll too to trigger `onStartReached` which triggers other updates
await waitForBatchedUpdatesWithAct();
scrollToOffset(0);
// ReportScreen relies on the onLayout event to receive updates from onyx.
triggerListLayout();
Expand Down
Loading