diff --git a/tests/perf-test/BaseOptionsList.perf-test.tsx b/tests/perf-test/BaseOptionsList.perf-test.tsx index dc576861086..81a3dbf1e46 100644 --- a/tests/perf-test/BaseOptionsList.perf-test.tsx +++ b/tests/perf-test/BaseOptionsList.perf-test.tsx @@ -1,7 +1,7 @@ import {fireEvent} from '@testing-library/react-native'; import type {RenderResult} from '@testing-library/react-native'; import React, {useState} from 'react'; -import {measurePerformance} from 'reassure'; +import {measureRenders} from 'reassure'; import BaseOptionsList from '@components/OptionsList/BaseOptionsList'; import type {OptionData} from '@libs/ReportUtils'; import variables from '@styles/variables'; @@ -67,7 +67,7 @@ describe('[BaseOptionsList]', () => { } test('Should render 1 section and a thousand items', () => { - measurePerformance(); + measureRenders(); }); test('Should press a list item', () => { @@ -76,7 +76,7 @@ describe('[BaseOptionsList]', () => { fireEvent.press(screen.getByText('Item 5')); }; - measurePerformance(, {scenario}); + measureRenders(, {scenario}); }); test('Should render multiple selection and select 4 items', () => { @@ -88,7 +88,7 @@ describe('[BaseOptionsList]', () => { fireEvent.press(screen.getByText('Item 4')); }; - measurePerformance(, {scenario}); + measureRenders(, {scenario}); }); test('Should scroll and select a few items', () => { @@ -120,6 +120,6 @@ describe('[BaseOptionsList]', () => { fireEvent.press(screen.getByText('Item 15')); }; - measurePerformance(, {scenario}); + measureRenders(, {scenario}); }); }); diff --git a/tests/perf-test/ChatFinderPage.perf-test.tsx b/tests/perf-test/ChatFinderPage.perf-test.tsx index 4346977a1cd..a26b2caaa76 100644 --- a/tests/perf-test/ChatFinderPage.perf-test.tsx +++ b/tests/perf-test/ChatFinderPage.perf-test.tsx @@ -5,7 +5,7 @@ import React, {useMemo} from 'react'; import type {ComponentType} from 'react'; import Onyx from 'react-native-onyx'; import type {OnyxCollection, OnyxEntry} from 'react-native-onyx'; -import {measurePerformance} from 'reassure'; +import {measureRenders} from 'reassure'; import {LocaleContextProvider} from '@components/LocaleContextProvider'; import OptionListContextProvider, {OptionsListContext} from '@components/OptionListContextProvider'; import {KeyboardStateProvider} from '@components/withKeyboardState'; @@ -187,7 +187,7 @@ test('[ChatFinderPage] should render list with cached options', async () => { }), ) .then(() => - measurePerformance( + measureRenders( { }), ) .then(() => - measurePerformance( + measureRenders( { await screen.findByText('Count: 2'); }; - await measurePerformance( + await measureRenders( , { scenario, runs: 20 } ); diff --git a/tests/perf-test/ReportActionCompose.perf-test.tsx b/tests/perf-test/ReportActionCompose.perf-test.tsx index 66b3dc1ddf6..6f1a0b84d97 100644 --- a/tests/perf-test/ReportActionCompose.perf-test.tsx +++ b/tests/perf-test/ReportActionCompose.perf-test.tsx @@ -3,7 +3,7 @@ import type {ComponentType, EffectCallback} from 'react'; import React from 'react'; import Onyx from 'react-native-onyx'; import type Animated from 'react-native-reanimated'; -import {measurePerformance} from 'reassure'; +import {measureRenders} from 'reassure'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; import type {EmojiPickerRef} from '@libs/actions/EmojiPickerAction'; import type Navigation from '@libs/Navigation/Navigation'; @@ -105,7 +105,7 @@ test('[ReportActionCompose] should render Composer with text input interactions' }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] should scroll to hide suggestions', async () => { @@ -118,7 +118,7 @@ test('[ReportActionCompose] should scroll to hide suggestions', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] should press to block suggestions', async () => { @@ -131,7 +131,7 @@ test('[ReportActionCompose] should press to block suggestions', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] should press add attachemnt button', async () => { @@ -144,7 +144,7 @@ test('[ReportActionCompose] should press add attachemnt button', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] should press add emoji button', async () => { @@ -157,7 +157,7 @@ test('[ReportActionCompose] should press add emoji button', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] should press send message button', async () => { @@ -170,7 +170,7 @@ test('[ReportActionCompose] should press send message button', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] press add attachment button', async () => { @@ -182,7 +182,7 @@ test('[ReportActionCompose] press add attachment button', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] should press split bill button', async () => { @@ -193,7 +193,7 @@ test('[ReportActionCompose] should press split bill button', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionCompose] should press assign task button', async () => { @@ -204,5 +204,5 @@ test('[ReportActionCompose] should press assign task button', async () => { }; await waitForBatchedUpdates(); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); diff --git a/tests/perf-test/ReportActionsList.perf-test.tsx b/tests/perf-test/ReportActionsList.perf-test.tsx index 2928f73c53c..17ccba02189 100644 --- a/tests/perf-test/ReportActionsList.perf-test.tsx +++ b/tests/perf-test/ReportActionsList.perf-test.tsx @@ -1,7 +1,7 @@ import {fireEvent, screen} from '@testing-library/react-native'; import type {ComponentType} from 'react'; import Onyx from 'react-native-onyx'; -import {measurePerformance} from 'reassure'; +import {measureRenders} from 'reassure'; import type {WithCurrentUserPersonalDetailsProps} from '@components/withCurrentUserPersonalDetails'; import type Navigation from '@libs/Navigation/Navigation'; import ComposeProviders from '@src/components/ComposeProviders'; @@ -123,7 +123,7 @@ test('[ReportActionsList] should render ReportActionsList with 500 reportActions [ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtilsModule.fakePersonalDetails, }); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionsList] should render list items', async () => { @@ -138,7 +138,7 @@ test('[ReportActionsList] should render list items', async () => { [ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtilsModule.fakePersonalDetails, }); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[ReportActionsList] should scroll through list of items', async () => { @@ -170,5 +170,5 @@ test('[ReportActionsList] should scroll through list of items', async () => { [ONYXKEYS.PERSONAL_DETAILS_LIST]: LHNTestUtilsModule.fakePersonalDetails, }); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); diff --git a/tests/perf-test/ReportScreen.perf-test.tsx b/tests/perf-test/ReportScreen.perf-test.tsx index 8b1d2d5de40..ab1588c63a9 100644 --- a/tests/perf-test/ReportScreen.perf-test.tsx +++ b/tests/perf-test/ReportScreen.perf-test.tsx @@ -6,7 +6,7 @@ import type ReactNative from 'react-native'; import {Dimensions, InteractionManager} from 'react-native'; import Onyx from 'react-native-onyx'; import type Animated from 'react-native-reanimated'; -import {measurePerformance} from 'reassure'; +import {measureRenders} from 'reassure'; import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; import type Navigation from '@libs/Navigation/Navigation'; import type {AuthScreensParamList} from '@libs/Navigation/types'; @@ -227,7 +227,7 @@ test('[ReportScreen] should render ReportScreen', async () => { ...reportCollectionDataSet, ...reportActionsCollectionDataSet, }); - await measurePerformance( + await measureRenders( { ...reportCollectionDataSet, ...reportActionsCollectionDataSet, }); - await measurePerformance( + await measureRenders( { ...reportCollectionDataSet, ...reportActionsCollectionDataSet, }); - await measurePerformance( + await measureRenders( { - measurePerformance(); + measureRenders(); }); test('[SelectionList] should press a list item', () => { @@ -128,7 +128,7 @@ test('[SelectionList] should press a list item', () => { fireEvent.press(screen.getByText('Item 5')); }; - measurePerformance(, {scenario}); + measureRenders(, {scenario}); }); test('[SelectionList] should render multiple selection and select 3 items', () => { @@ -139,7 +139,7 @@ test('[SelectionList] should render multiple selection and select 3 items', () = fireEvent.press(screen.getByText('Item 3')); }; - measurePerformance(, {scenario}); + measureRenders(, {scenario}); }); test('[SelectionList] should scroll and select a few items', () => { @@ -171,5 +171,5 @@ test('[SelectionList] should scroll and select a few items', () => { fireEvent.press(screen.getByText('Item 15')); }; - measurePerformance(, {scenario}); + measureRenders(, {scenario}); }); diff --git a/tests/perf-test/SidebarLinks.perf-test.tsx b/tests/perf-test/SidebarLinks.perf-test.tsx index 9a385c1917f..9358419cefa 100644 --- a/tests/perf-test/SidebarLinks.perf-test.tsx +++ b/tests/perf-test/SidebarLinks.perf-test.tsx @@ -1,6 +1,6 @@ import {fireEvent, screen} from '@testing-library/react-native'; import Onyx from 'react-native-onyx'; -import {measurePerformance} from 'reassure'; +import {measureRenders} from 'reassure'; import variables from '@styles/variables'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -82,7 +82,7 @@ describe('SidebarLinks', () => { ...mockedResponseMap, }); - await measurePerformance(, {scenario, runs: 1}); + await measureRenders(, {scenario, runs: 1}); }); test('[SidebarLinks] should render list itmes', async () => { @@ -104,7 +104,7 @@ describe('SidebarLinks', () => { ...mockedResponseMap, }); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[SidebarLinks] should scroll through the list of items ', async () => { @@ -142,7 +142,7 @@ describe('SidebarLinks', () => { ...mockedResponseMap, }); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); test('[SidebarLinks] should click on list item', async () => { @@ -161,6 +161,6 @@ describe('SidebarLinks', () => { ...mockedResponseMap, }); - await measurePerformance(, {scenario}); + await measureRenders(, {scenario}); }); });