Skip to content

Commit 108a0d9

Browse files
committed
Remove composite scenario from SidebarUtils perf test
1 parent 008b0dd commit 108a0d9

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

tests/perf-test/SidebarLinks.perf-test.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {fireEvent, screen, waitFor} from '@testing-library/react-native';
21
import type * as Navigation from '@react-navigation/native';
2+
import {fireEvent, screen, waitFor} from '@testing-library/react-native';
33
import type {OnyxCollection} from 'react-native-onyx';
44
import Onyx from 'react-native-onyx';
55
import {measureRenders} from 'reassure';
@@ -350,8 +350,7 @@ describe('SidebarLinks', () => {
350350
const scenario = async () => {
351351
await screen.findByTestId('lhn-options-list');
352352
const firstReportID = '1';
353-
const currentArchivedStatus =
354-
reportNameValuePairs[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${firstReportID}`]?.private_isArchived;
353+
const currentArchivedStatus = reportNameValuePairs[`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${firstReportID}`]?.private_isArchived;
355354
await Onyx.merge(`${ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS}${firstReportID}`, {
356355
private_isArchived: currentArchivedStatus === 'true' ? 'false' : 'true',
357356
});
@@ -362,8 +361,7 @@ describe('SidebarLinks', () => {
362361
});
363362

364363
test('[SidebarLinks LHN] scaling test – initial render with 500 reports', async () => {
365-
const {reports, reportActions, reportNameValuePairs, policies, personalDetails, reportMetadata} =
366-
createReportsWithActions(500);
364+
const {reports, reportActions, reportNameValuePairs, policies, personalDetails, reportMetadata} = createReportsWithActions(500);
367365

368366
const scenario = async () => {
369367
await screen.findByTestId('lhn-options-list');

tests/perf-test/SidebarUtils.perf-test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ import Onyx from 'react-native-onyx';
44
import {measureFunction} from 'reassure';
55
import {getMovedReportID} from '@libs/ModifiedExpenseMessage';
66
import {getLastMessageTextForReport} from '@libs/OptionsListUtils';
7-
import {
8-
getSortedReportActions,
9-
getSortedReportActionsForDisplay,
10-
shouldReportActionBeVisibleAsLastAction,
11-
} from '@libs/ReportActionsUtils';
7+
import {getSortedReportActions, getSortedReportActionsForDisplay, shouldReportActionBeVisibleAsLastAction} from '@libs/ReportActionsUtils';
128
import SidebarUtils from '@libs/SidebarUtils';
139
import CONST from '@src/CONST';
1410
import ONYXKEYS from '@src/ONYXKEYS';

0 commit comments

Comments
 (0)