Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Merge pull request #48445" #49770

Merged
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
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function ReportActionsList({
}

const mostRecentReportActionCreated = sortedVisibleReportActions[0]?.created ?? '';
if (mostRecentReportActionCreated === unreadMarkerTime) {
if (mostRecentReportActionCreated <= unreadMarkerTime) {
return;
}

Expand Down
14 changes: 3 additions & 11 deletions tests/perf-test/ReportActionsList.perf-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,31 +81,23 @@
});

function ReportActionsListWrapper() {
const reportActions = ReportTestUtils.getMockedSortedReportActions(500);
const lastVisibleActionCreated = reportActions[0].created;
const report = {
...LHNTestUtilsModule.getFakeReport(),
lastVisibleActionCreated,
lastReadTime: lastVisibleActionCreated,
};

return (
<ComposeProviders components={[OnyxProvider, LocaleContextProvider, ReportAttachmentsProvider]}>
<ReactionListContext.Provider value={mockRef}>
<ActionListContext.Provider value={mockRef}>
<ReportActionsList
parentReportAction={createRandomReportAction(1)}
parentReportActionForTransactionThread={undefined}
sortedReportActions={reportActions}
report={report}
sortedReportActions={ReportTestUtils.getMockedSortedReportActions(500)}
report={LHNTestUtilsModule.getFakeReport()}
onLayout={mockOnLayout}
onScroll={mockOnScroll}
onContentSizeChange={() => {}}
listID={1}
loadOlderChats={mockLoadChats}
loadNewerChats={mockLoadChats}
transactionThreadReport={LHNTestUtilsModule.getFakeReport()}
reportActions={reportActions}
reportActions={ReportTestUtils.getMockedSortedReportActions(500)}
/>
</ActionListContext.Provider>
</ReactionListContext.Provider>
Expand All @@ -123,7 +115,7 @@
[ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtilsModule.fakePersonalDetails,
});

await measurePerformance(<ReportActionsListWrapper />, {scenario});

Check failure on line 118 in tests/perf-test/ReportActionsList.perf-test.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'measurePerformance' is deprecated. The `measurePerformance` function has been renamed to `measureRenders`. The `measurePerformance` alias is now deprecated and will be removed in future releases
});

test('[ReportActionsList] should render list items', async () => {
Expand All @@ -138,7 +130,7 @@
[ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtilsModule.fakePersonalDetails,
});

await measurePerformance(<ReportActionsListWrapper />, {scenario});

Check failure on line 133 in tests/perf-test/ReportActionsList.perf-test.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'measurePerformance' is deprecated. The `measurePerformance` function has been renamed to `measureRenders`. The `measurePerformance` alias is now deprecated and will be removed in future releases
});

test('[ReportActionsList] should scroll through list of items', async () => {
Expand Down Expand Up @@ -170,5 +162,5 @@
[ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtilsModule.fakePersonalDetails,
});

await measurePerformance(<ReportActionsListWrapper />, {scenario});

Check failure on line 165 in tests/perf-test/ReportActionsList.perf-test.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

'measurePerformance' is deprecated. The `measurePerformance` function has been renamed to `measureRenders`. The `measurePerformance` alias is now deprecated and will be removed in future releases
});
Loading