Skip to content
Merged
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
12 changes: 4 additions & 8 deletions tests/perf-test/SidebarLinks.perf-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import ONYXKEYS from '@src/ONYXKEYS';
import * as LHNTestUtils from '../utils/LHNTestUtils';
import * as TestHelper from '../utils/TestHelper';
import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
import wrapInAct from '../utils/wrapInActHelper';
import wrapOnyxWithWaitForBatchedUpdates from '../utils/wrapOnyxWithWaitForBatchedUpdates';

jest.mock('@libs/Permissions');
Expand All @@ -27,6 +26,7 @@ jest.mock('../../src/libs/Navigation/navigationRef', () => ({
routes: [],
}),
addListener: () => () => {},
isReady: () => true,
}));
jest.mock('@components/Icon/Expensicons');

Expand Down Expand Up @@ -81,7 +81,7 @@ describe('SidebarLinks', () => {

await waitForBatchedUpdates();

Onyx.multiSet({
await Onyx.multiSet({
[ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtils.fakePersonalDetails,
[ONYXKEYS.BETAS]: [CONST.BETAS.DEFAULT_ROOMS],
[ONYXKEYS.NVP_PRIORITY_MODE]: CONST.PRIORITY_MODE.GSD,
Expand All @@ -100,12 +100,8 @@ describe('SidebarLinks', () => {
});

// Then wait for the specific list item to be available
await waitFor(async () => {
const button = await screen.findByTestId('1');
await wrapInAct(() => {
fireEvent.press(button);
});
});
const button = await screen.findByTestId('1');
fireEvent.press(button);
};

await Onyx.multiSet({
Expand Down
Loading