From 46b6a09f211f3306f50c5e5d7d29c796823eae5c Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Thu, 11 Apr 2024 17:45:46 +0200 Subject: [PATCH 1/2] migrate search page to chat finder page --- src/CONST.ts | 3 +- src/ROUTES.ts | 2 +- src/SCREENS.ts | 4 +- src/libs/E2E/reactNativeLaunchingTest.ts | 3 +- ...t.e2e.ts => openChatFinderPageTest.e2e.ts} | 10 ++--- .../Navigation/AppNavigator/AuthScreens.tsx | 2 +- .../ModalStackNavigators/index.tsx | 8 ++-- .../Navigators/LeftModalNavigator.tsx | 4 +- .../createCustomBottomTabNavigator/TopBar.tsx | 2 +- src/libs/Navigation/linkingConfig/config.ts | 4 +- src/libs/Navigation/types.ts | 10 ++--- .../ChatFinderPageFooter.tsx} | 6 +-- .../{SearchPage => ChatFinderPage}/index.tsx | 39 ++++++++++--------- tests/e2e/config.ts | 7 ++-- tests/perf-test/SearchPage.perf-test.tsx | 32 +++++++-------- 15 files changed, 71 insertions(+), 65 deletions(-) rename src/libs/E2E/tests/{openSearchPageTest.e2e.ts => openChatFinderPageTest.e2e.ts} (85%) rename src/pages/{SearchPage/SearchPageFooter.tsx => ChatFinderPage/ChatFinderPageFooter.tsx} (77%) rename src/pages/{SearchPage => ChatFinderPage}/index.tsx (85%) diff --git a/src/CONST.ts b/src/CONST.ts index 39c3d9d3109b..7b48698f55a6 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -873,7 +873,8 @@ const CONST = { }, TIMING: { CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION: 'calc_most_recent_last_modified_action', - SEARCH_RENDER: 'search_render', + // ASK: Should we also update this name? + CHAT_FINDER_RENDER: 'chat_finder', CHAT_RENDER: 'chat_render', OPEN_REPORT: 'open_report', HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render', diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 77b5ffd2c80f..be447acb5d6a 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -28,7 +28,7 @@ const ROUTES = { route: 'flag/:reportID/:reportActionID', getRoute: (reportID: string, reportActionID: string) => `flag/${reportID}/${reportActionID}` as const, }, - SEARCH: 'search', + CHAT_FINDER: 'chat-finder', DETAILS: { route: 'details', getRoute: (login: string) => `details?login=${encodeURIComponent(login)}` as const, diff --git a/src/SCREENS.ts b/src/SCREENS.ts index b3c2012e90d2..79693f6fee5d 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -95,7 +95,7 @@ const SCREENS = { ROOT: 'SaveTheWorld_Root', }, LEFT_MODAL: { - SEARCH: 'Search', + CHAT_FINDER: 'ChatFinder', WORKSPACE_SWITCHER: 'WorkspaceSwitcher', }, WORKSPACE_SWITCHER: { @@ -312,7 +312,7 @@ const SCREENS = { REPORT_PARTICIPANTS_ROOT: 'ReportParticipants_Root', ROOM_MEMBERS_ROOT: 'RoomMembers_Root', ROOM_INVITE_ROOT: 'RoomInvite_Root', - SEARCH_ROOT: 'Search_Root', + CHAT_FINDER_ROOT: 'ChatFinder_Root', FLAG_COMMENT_ROOT: 'FlagComment_Root', REIMBURSEMENT_ACCOUNT: 'ReimbursementAccount', GET_ASSISTANCE: 'GetAssistance', diff --git a/src/libs/E2E/reactNativeLaunchingTest.ts b/src/libs/E2E/reactNativeLaunchingTest.ts index 776e3de74f06..0a685a2788d1 100644 --- a/src/libs/E2E/reactNativeLaunchingTest.ts +++ b/src/libs/E2E/reactNativeLaunchingTest.ts @@ -35,7 +35,8 @@ if (!appInstanceId) { // import your test here, define its name and config first in e2e/config.js const tests: Tests = { [E2EConfig.TEST_NAMES.AppStartTime]: require('./tests/appStartTimeTest.e2e').default, - [E2EConfig.TEST_NAMES.OpenSearchPage]: require('./tests/openSearchPageTest.e2e').default, + // ASK: Should we also update this name? + [E2EConfig.TEST_NAMES.OpenChatFinderPage]: require('./tests/openChatFinderPageTest.e2e').default, [E2EConfig.TEST_NAMES.ChatOpening]: require('./tests/chatOpeningTest.e2e').default, [E2EConfig.TEST_NAMES.ReportTyping]: require('./tests/reportTypingTest.e2e').default, [E2EConfig.TEST_NAMES.Linking]: require('./tests/linkingTest.e2e').default, diff --git a/src/libs/E2E/tests/openSearchPageTest.e2e.ts b/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts similarity index 85% rename from src/libs/E2E/tests/openSearchPageTest.e2e.ts rename to src/libs/E2E/tests/openChatFinderPageTest.e2e.ts index 86da851396f6..549cb7b8c2c9 100644 --- a/src/libs/E2E/tests/openSearchPageTest.e2e.ts +++ b/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts @@ -9,7 +9,7 @@ import ROUTES from '@src/ROUTES'; const test = () => { // check for login (if already logged in the action will simply resolve) - console.debug('[E2E] Logging in for search'); + console.debug('[E2E] Logging in for chat finding'); E2ELogin().then((neededLogin: boolean): Promise | undefined => { if (neededLogin) { @@ -19,12 +19,12 @@ const test = () => { ); } - console.debug('[E2E] Logged in, getting search metrics and submitting them…'); + console.debug('[E2E] Logged in, getting chat finding metrics and submitting them…'); Performance.subscribeToMeasurements((entry) => { if (entry.name === CONST.TIMING.SIDEBAR_LOADED) { - console.debug(`[E2E] Sidebar loaded, navigating to search route…`); - Navigation.navigate(ROUTES.SEARCH); + console.debug(`[E2E] Sidebar loaded, navigating to chat finder route…`); + Navigation.navigate(ROUTES.CHAT_FINDER); return; } @@ -36,7 +36,7 @@ const test = () => { console.debug(`[E2E] Submitting!`); E2EClient.submitTestResults({ branch: Config.E2E_BRANCH, - name: 'Open Search Page TTI', + name: 'Open Chat Finder Page TTI', duration: entry.duration, }) .then(() => { diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index fde0202d3d2f..9157d7486c9e 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -238,7 +238,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie const unsubscribeSearchShortcut = KeyboardShortcut.subscribe( searchShortcutConfig.shortcutKey, () => { - Modal.close(Session.checkIfActionIsAllowed(() => Navigation.navigate(ROUTES.SEARCH))); + Modal.close(Session.checkIfActionIsAllowed(() => Navigation.navigate(ROUTES.CHAT_FINDER))); }, shortcutsOverviewShortcutConfig.descriptionKey, shortcutsOverviewShortcutConfig.modifiers, diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx index c251f8143631..504dfe534d72 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx @@ -4,6 +4,7 @@ import {createStackNavigator} from '@react-navigation/stack'; import React from 'react'; import type { AddPersonalBankAccountNavigatorParamList, + ChatFinderNavigatorParamList, DetailsNavigatorParamList, EditRequestNavigatorParamList, EnablePaymentsNavigatorParamList, @@ -22,7 +23,6 @@ import type { ReportSettingsNavigatorParamList, RoomInviteNavigatorParamList, RoomMembersNavigatorParamList, - SearchNavigatorParamList, SettingsNavigatorParamList, SignInNavigatorParamList, SplitDetailsNavigatorParamList, @@ -143,8 +143,8 @@ const RoomInviteModalStackNavigator = createModalStackNavigator require('../../../../pages/RoomInvitePage').default as React.ComponentType, }); -const SearchModalStackNavigator = createModalStackNavigator({ - [SCREENS.SEARCH_ROOT]: () => require('../../../../pages/SearchPage').default as React.ComponentType, +const ChatFinderModalStackNavigator = createModalStackNavigator({ + [SCREENS.CHAT_FINDER_ROOT]: () => require('../../../../pages/ChatFinderPage').default as React.ComponentType, }); const NewChatModalStackNavigator = createModalStackNavigator({ @@ -338,7 +338,7 @@ export { ReportDescriptionModalStackNavigator, RoomInviteModalStackNavigator, RoomMembersModalStackNavigator, - SearchModalStackNavigator, + ChatFinderModalStackNavigator, SettingsModalStackNavigator, SignInModalStackNavigator, SplitDetailsModalStackNavigator, diff --git a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx index 8f76d8fbdd7b..159430a66a43 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/LeftModalNavigator.tsx @@ -32,8 +32,8 @@ function LeftModalNavigator({navigation}: LeftModalNavigatorProps) { Navigation.navigate(ROUTES.SEARCH))} + onPress={Session.checkIfActionIsAllowed(() => Navigation.navigate(ROUTES.CHAT_FINDER))} > ['config'] = { [SCREENS.NOT_FOUND]: '*', [NAVIGATORS.LEFT_MODAL_NAVIGATOR]: { screens: { - [SCREENS.LEFT_MODAL.SEARCH]: { + [SCREENS.LEFT_MODAL.CHAT_FINDER]: { screens: { - [SCREENS.SEARCH_ROOT]: ROUTES.SEARCH, + [SCREENS.CHAT_FINDER_ROOT]: ROUTES.CHAT_FINDER, }, }, [SCREENS.LEFT_MODAL.WORKSPACE_SWITCHER]: { diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 3976d12a9537..5d4a614909c9 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -294,8 +294,8 @@ type NewChatNavigatorParamList = { [SCREENS.NEW_CHAT.ROOT]: undefined; }; -type SearchNavigatorParamList = { - [SCREENS.SEARCH_ROOT]: undefined; +type ChatFinderNavigatorParamList = { + [SCREENS.CHAT_FINDER_ROOT]: undefined; }; type DetailsNavigatorParamList = { @@ -568,7 +568,7 @@ type PrivateNotesNavigatorParamList = { }; type LeftModalNavigatorParamList = { - [SCREENS.LEFT_MODAL.SEARCH]: NavigatorScreenParams; + [SCREENS.LEFT_MODAL.CHAT_FINDER]: NavigatorScreenParams; [SCREENS.LEFT_MODAL.WORKSPACE_SWITCHER]: NavigatorScreenParams; }; @@ -744,7 +744,7 @@ type AuthScreensParamList = SharedScreensParamList & { }; }; -type RootStackParamList = PublicScreensParamList & AuthScreensParamList & SearchNavigatorParamList; +type RootStackParamList = PublicScreensParamList & AuthScreensParamList & ChatFinderNavigatorParamList; type BottomTabName = keyof BottomTabNavigatorParamList; @@ -788,7 +788,7 @@ export type { ParticipantsNavigatorParamList, RoomMembersNavigatorParamList, RoomInviteNavigatorParamList, - SearchNavigatorParamList, + ChatFinderNavigatorParamList, NewChatNavigatorParamList, NewTaskNavigatorParamList, TeachersUniteNavigatorParamList, diff --git a/src/pages/SearchPage/SearchPageFooter.tsx b/src/pages/ChatFinderPage/ChatFinderPageFooter.tsx similarity index 77% rename from src/pages/SearchPage/SearchPageFooter.tsx rename to src/pages/ChatFinderPage/ChatFinderPageFooter.tsx index 3d5ebfd2c193..ce7b4f3003df 100644 --- a/src/pages/SearchPage/SearchPageFooter.tsx +++ b/src/pages/ChatFinderPage/ChatFinderPageFooter.tsx @@ -4,7 +4,7 @@ import ReferralProgramCTA from '@components/ReferralProgramCTA'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; -function SearchPageFooter() { +function ChatFinderPageFooter() { const themeStyles = useThemeStyles(); return ( @@ -14,6 +14,6 @@ function SearchPageFooter() { ); } -SearchPageFooter.displayName = 'SearchPageFooter'; +ChatFinderPageFooter.displayName = 'ChatFinderPageFooter'; -export default SearchPageFooter; +export default ChatFinderPageFooter; diff --git a/src/pages/SearchPage/index.tsx b/src/pages/ChatFinderPage/index.tsx similarity index 85% rename from src/pages/SearchPage/index.tsx rename to src/pages/ChatFinderPage/index.tsx index 7d2a5bfecbb8..80c64de1c69b 100644 --- a/src/pages/SearchPage/index.tsx +++ b/src/pages/ChatFinderPage/index.tsx @@ -25,9 +25,9 @@ import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import type SCREENS from '@src/SCREENS'; import type * as OnyxTypes from '@src/types/onyx'; -import SearchPageFooter from './SearchPageFooter'; +import ChatFinderPageFooter from './ChatFinderPageFooter'; -type SearchPageOnyxProps = { +type ChatFinderPageOnyxProps = { /** Beta features list */ betas: OnyxEntry; @@ -35,25 +35,26 @@ type SearchPageOnyxProps = { isSearchingForReports: OnyxEntry; }; -type SearchPageProps = SearchPageOnyxProps & StackScreenProps; +type ChatFinderPageProps = ChatFinderPageOnyxProps & StackScreenProps; type Options = OptionsListUtils.Options & {headerMessage: string}; -type SearchPageSectionItem = { +type ChatFinderPageSectionItem = { data: OptionData[]; shouldShow: boolean; }; -type SearchPageSectionList = SearchPageSectionItem[]; +type ChatFinderPageSectionList = ChatFinderPageSectionItem[]; const setPerformanceTimersEnd = () => { - Timing.end(CONST.TIMING.SEARCH_RENDER); - Performance.markEnd(CONST.TIMING.SEARCH_RENDER); + // ASK: Should we also update this name? + Timing.end(CONST.TIMING.CHAT_FINDER_RENDER); + Performance.markEnd(CONST.TIMING.CHAT_FINDER_RENDER); }; -const SearchPageFooterInstance = ; +const ChatFinderPageFooterInstance = ; -function SearchPage({betas, isSearchingForReports, navigation}: SearchPageProps) { +function ChatFinderPage({betas, isSearchingForReports, navigation}: ChatFinderPageProps) { const [isScreenTransitionEnd, setIsScreenTransitionEnd] = useState(false); const {translate} = useLocalize(); const {isOffline} = useNetwork(); @@ -67,8 +68,9 @@ function SearchPage({betas, isSearchingForReports, navigation}: SearchPageProps) const [searchValue, debouncedSearchValue, setSearchValue] = useDebouncedState(''); useEffect(() => { - Timing.start(CONST.TIMING.SEARCH_RENDER); - Performance.markStart(CONST.TIMING.SEARCH_RENDER); + // ASK: Should we also update this name? + Timing.start(CONST.TIMING.CHAT_FINDER_RENDER); + Performance.markStart(CONST.TIMING.CHAT_FINDER_RENDER); }, []); useEffect(() => { @@ -115,8 +117,8 @@ function SearchPage({betas, isSearchingForReports, navigation}: SearchPageProps) const {recentReports, personalDetails: localPersonalDetails, userToInvite, headerMessage} = debouncedSearchValue.trim() !== '' ? filteredOptions : searchOptions; - const sections = useMemo((): SearchPageSectionList => { - const newSections: SearchPageSectionList = []; + const sections = useMemo((): ChatFinderPageSectionList => { + const newSections: ChatFinderPageSectionList = []; if (recentReports?.length > 0) { newSections.push({ @@ -162,7 +164,7 @@ function SearchPage({betas, isSearchingForReports, navigation}: SearchPageProps) return ( ( <> @@ -186,7 +189,7 @@ function SearchPage({betas, isSearchingForReports, navigation}: SearchPageProps) onLayout={setPerformanceTimersEnd} onSelectRow={selectReport} showLoadingPlaceholder={!areOptionsInitialized} - footerContent={SearchPageFooterInstance} + footerContent={ChatFinderPageFooterInstance} isLoadingNewOptions={isSearchingForReports ?? undefined} /> @@ -196,9 +199,9 @@ function SearchPage({betas, isSearchingForReports, navigation}: SearchPageProps) ); } -SearchPage.displayName = 'SearchPage'; +ChatFinderPage.displayName = 'ChatFinderPage'; -export default withOnyx({ +export default withOnyx({ betas: { key: ONYXKEYS.BETAS, }, @@ -206,4 +209,4 @@ export default withOnyx({ key: ONYXKEYS.IS_SEARCHING_FOR_REPORTS, initWithStoredValues: false, }, -})(SearchPage); +})(ChatFinderPage); diff --git a/tests/e2e/config.ts b/tests/e2e/config.ts index d6d097b6c346..63469454a1ac 100644 --- a/tests/e2e/config.ts +++ b/tests/e2e/config.ts @@ -4,7 +4,8 @@ const OUTPUT_DIR = process.env.WORKING_DIRECTORY || './tests/e2e/results'; // add your test name here … const TEST_NAMES = { AppStartTime: 'App start time', - OpenSearchPage: 'Open search page TTI', + // ASK: Should we also update this name? + OpenChatFinderPage: 'Open chat finder page TTI', ReportTyping: 'Report typing', ChatOpening: 'Chat opening', Linking: 'Linking', @@ -71,8 +72,8 @@ export default { // ... any additional config you might need }, - [TEST_NAMES.OpenSearchPage]: { - name: TEST_NAMES.OpenSearchPage, + [TEST_NAMES.OpenChatFinderPage]: { + name: TEST_NAMES.OpenChatFinderPage, }, // TODO: Fix text and enable again // [TEST_NAMES.ReportTyping]: { diff --git a/tests/perf-test/SearchPage.perf-test.tsx b/tests/perf-test/SearchPage.perf-test.tsx index ea759a1201b2..c5bbd0eb1266 100644 --- a/tests/perf-test/SearchPage.perf-test.tsx +++ b/tests/perf-test/SearchPage.perf-test.tsx @@ -12,7 +12,7 @@ import OptionListContextProvider, {OptionsListContext} from '@components/OptionL import type {WithNavigationFocusProps} from '@components/withNavigationFocus'; import type {RootStackParamList} from '@libs/Navigation/types'; import {createOptionList} from '@libs/OptionsListUtils'; -import SearchPage from '@pages/SearchPage'; +import ChatFinderPage from '@pages/ChatFinderPage'; import ComposeProviders from '@src/components/ComposeProviders'; import OnyxProvider from '@src/components/OnyxProvider'; import CONST from '@src/CONST'; @@ -116,16 +116,16 @@ afterEach(() => { PusherHelper.teardown(); }); -type SearchPageProps = StackScreenProps & { +type ChatFinderPageProps = StackScreenProps & { betas: OnyxEntry; reports: OnyxCollection; isSearchingForReports: OnyxEntry; }; -function SearchPageWrapper(args: SearchPageProps) { +function ChatFinderPageWrapper(args: ChatFinderPageProps) { return ( - ({options: mockedOptions, initializeOptions: () => {}, areOptionsInitialized: true}), [])}> - { const {addListener} = TestHelper.createAddListenerMock(); const scenario = async () => { - await screen.findByTestId('SearchPage'); + await screen.findByTestId('ChatFinderPage'); }; const navigation = {addListener}; @@ -168,7 +168,7 @@ test('[Search Page] should render list with cached options', async () => { }), ) // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. - .then(() => measurePerformance(, {scenario})) + .then(() => measurePerformance(, {scenario})) ); }); @@ -176,7 +176,7 @@ test('[Search Page] should interact when text input changes', async () => { const {addListener} = TestHelper.createAddListenerMock(); const scenario = async () => { - await screen.findByTestId('SearchPage'); + await screen.findByTestId('ChatFinderPage'); const input = screen.getByTestId('selection-list-text-input'); fireEvent.changeText(input, 'Email Four'); @@ -197,7 +197,7 @@ test('[Search Page] should interact when text input changes', async () => { }), ) // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. - .then(() => measurePerformance(, {scenario})) + .then(() => measurePerformance(, {scenario})) ); }); @@ -206,7 +206,7 @@ test.skip('[Search Page] should render selection list', async () => { const smallMockedPersonalDetails = getMockedPersonalDetails(5); const scenario = async () => { - await screen.findByTestId('SearchPage'); + await screen.findByTestId('ChatFinderPage'); await waitFor(triggerTransitionEnd as Awaited<() => Promise>); await screen.findByTestId('selection-list'); await screen.findByText(smallMockedPersonalDetails['1'].login as TextMatch); @@ -226,7 +226,7 @@ test.skip('[Search Page] should render selection list', async () => { }), ) // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. - .then(() => measurePerformance(, {scenario})) + .then(() => measurePerformance(, {scenario})) ); }); @@ -234,7 +234,7 @@ test('[Search Page] should search in selection list', async () => { const {triggerTransitionEnd, addListener} = TestHelper.createAddListenerMock(); const scenario = async () => { - await screen.findByTestId('SearchPage'); + await screen.findByTestId('ChatFinderPage'); await waitFor(triggerTransitionEnd as Awaited<() => Promise>); const input = screen.getByTestId('selection-list-text-input'); @@ -257,7 +257,7 @@ test('[Search Page] should search in selection list', async () => { }), ) // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. - .then(() => measurePerformance(, {scenario})) + .then(() => measurePerformance(, {scenario})) ); }); @@ -265,7 +265,7 @@ test('[Search Page] should click on list item', async () => { const {triggerTransitionEnd, addListener} = TestHelper.createAddListenerMock(); const scenario = async () => { - await screen.findByTestId('SearchPage'); + await screen.findByTestId('ChatFinderPage'); const input = screen.getByTestId('selection-list-text-input'); await waitFor(triggerTransitionEnd as Awaited<() => Promise>); @@ -288,6 +288,6 @@ test('[Search Page] should click on list item', async () => { }), ) // @ts-expect-error TODO: Remove this once TestHelper (https://github.com/Expensify/App/issues/25318) is migrated to TypeScript. - .then(() => measurePerformance(, {scenario})) + .then(() => measurePerformance(, {scenario})) ); }); From 86a01f7ddc7ddcbc2ba436a8bc3c04345925e4e7 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Tue, 16 Apr 2024 10:38:52 +0200 Subject: [PATCH 2/2] Remove comments --- src/CONST.ts | 3 +-- src/libs/E2E/reactNativeLaunchingTest.ts | 1 - src/libs/E2E/tests/openChatFinderPageTest.e2e.ts | 6 +++--- src/pages/ChatFinderPage/index.tsx | 2 -- tests/e2e/config.ts | 1 - 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/CONST.ts b/src/CONST.ts index d87243282955..43662829b8d4 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -875,8 +875,7 @@ const CONST = { }, TIMING: { CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION: 'calc_most_recent_last_modified_action', - // ASK: Should we also update this name? - CHAT_FINDER_RENDER: 'chat_finder', + CHAT_FINDER_RENDER: 'search_render', CHAT_RENDER: 'chat_render', OPEN_REPORT: 'open_report', HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render', diff --git a/src/libs/E2E/reactNativeLaunchingTest.ts b/src/libs/E2E/reactNativeLaunchingTest.ts index 0a685a2788d1..9d5b0be0d2e7 100644 --- a/src/libs/E2E/reactNativeLaunchingTest.ts +++ b/src/libs/E2E/reactNativeLaunchingTest.ts @@ -35,7 +35,6 @@ if (!appInstanceId) { // import your test here, define its name and config first in e2e/config.js const tests: Tests = { [E2EConfig.TEST_NAMES.AppStartTime]: require('./tests/appStartTimeTest.e2e').default, - // ASK: Should we also update this name? [E2EConfig.TEST_NAMES.OpenChatFinderPage]: require('./tests/openChatFinderPageTest.e2e').default, [E2EConfig.TEST_NAMES.ChatOpening]: require('./tests/chatOpeningTest.e2e').default, [E2EConfig.TEST_NAMES.ReportTyping]: require('./tests/reportTypingTest.e2e').default, diff --git a/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts b/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts index 549cb7b8c2c9..9d2b117a7044 100644 --- a/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts +++ b/src/libs/E2E/tests/openChatFinderPageTest.e2e.ts @@ -9,7 +9,7 @@ import ROUTES from '@src/ROUTES'; const test = () => { // check for login (if already logged in the action will simply resolve) - console.debug('[E2E] Logging in for chat finding'); + console.debug('[E2E] Logging in for chat finder'); E2ELogin().then((neededLogin: boolean): Promise | undefined => { if (neededLogin) { @@ -19,7 +19,7 @@ const test = () => { ); } - console.debug('[E2E] Logged in, getting chat finding metrics and submitting them…'); + console.debug('[E2E] Logged in, getting chat finder metrics and submitting them…'); Performance.subscribeToMeasurements((entry) => { if (entry.name === CONST.TIMING.SIDEBAR_LOADED) { @@ -29,7 +29,7 @@ const test = () => { } console.debug(`[E2E] Entry: ${JSON.stringify(entry)}`); - if (entry.name !== CONST.TIMING.SEARCH_RENDER) { + if (entry.name !== CONST.TIMING.CHAT_FINDER_RENDER) { return; } diff --git a/src/pages/ChatFinderPage/index.tsx b/src/pages/ChatFinderPage/index.tsx index 50228f1c23aa..f992fa37d8c5 100644 --- a/src/pages/ChatFinderPage/index.tsx +++ b/src/pages/ChatFinderPage/index.tsx @@ -45,7 +45,6 @@ type ChatFinderPageSectionItem = { type ChatFinderPageSectionList = ChatFinderPageSectionItem[]; const setPerformanceTimersEnd = () => { - // ASK: Should we also update this name? Timing.end(CONST.TIMING.CHAT_FINDER_RENDER); Performance.markEnd(CONST.TIMING.CHAT_FINDER_RENDER); }; @@ -66,7 +65,6 @@ function ChatFinderPage({betas, isSearchingForReports, navigation}: ChatFinderPa const [searchValue, debouncedSearchValue, setSearchValue] = useDebouncedState(''); useEffect(() => { - // ASK: Should we also update this name? Timing.start(CONST.TIMING.CHAT_FINDER_RENDER); Performance.markStart(CONST.TIMING.CHAT_FINDER_RENDER); }, []); diff --git a/tests/e2e/config.ts b/tests/e2e/config.ts index 63469454a1ac..6fe88d45c2e9 100644 --- a/tests/e2e/config.ts +++ b/tests/e2e/config.ts @@ -4,7 +4,6 @@ const OUTPUT_DIR = process.env.WORKING_DIRECTORY || './tests/e2e/results'; // add your test name here … const TEST_NAMES = { AppStartTime: 'App start time', - // ASK: Should we also update this name? OpenChatFinderPage: 'Open chat finder page TTI', ReportTyping: 'Report typing', ChatOpening: 'Chat opening',