Skip to content

Commit

Permalink
Only navigate to search bar once sidebar is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGable committed Aug 16, 2023
1 parent 25af145 commit 028b384
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libs/E2E/tests/openSearchPageTest.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ const test = () => {
console.debug('[E2E] Logged in, getting search 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);
return;
}

console.debug(`[E2E] Entry: ${JSON.stringify(entry)}`);
if (entry.name !== CONST.TIMING.SEARCH_RENDER) {
return;
Expand All @@ -36,8 +42,6 @@ const test = () => {
console.debug('[E2E] Error while submitting test results:', err);
});
});

Navigation.navigate(ROUTES.SEARCH);
});
};

Expand Down

0 comments on commit 028b384

Please sign in to comment.