Skip to content

Commit

Permalink
navigate to blank page before going to url for e2e (#4860)
Browse files Browse the repository at this point in the history
Co-authored-by: Bryan Lai <[email protected]>
Co-authored-by: alisman <[email protected]>
  • Loading branch information
3 people authored Mar 21, 2024
1 parent dc7dbe9 commit 5e42b4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ describe('oncoprint', function() {
const urlWithUserConfig = createUrlWithSettingsQueryParam(
MANUAL_TRACK_CONFIG
);
// go to home page first because navigating to same page with hash params doesn't cause change
goToUrlAndSetLocalStorage(CBIOPORTAL_URL, false);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);
waitForOncoprint(ONCOPRINT_TIMEOUT);

Expand Down Expand Up @@ -172,9 +170,7 @@ describe('oncoprint', function() {
const urlWithUserConfig = createUrlWithSettingsQueryParam(
customConfig
);
// go to home page first because navigating to same page with hash params doesn't cause change
goToUrlAndSetLocalStorage(CBIOPORTAL_URL, false);
browser.url(urlWithUserConfig);
goToUrlAndSetLocalStorage(urlWithUserConfig, false);

waitForOncoprint(ONCOPRINT_TIMEOUT);

Expand Down
2 changes: 2 additions & 0 deletions end-to-end-test/shared/specUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ function goToUrlAndSetLocalStorage(url, authenticated = false) {
const currentUrl = browser.getUrl();
const needToLogin =
authenticated && (!currentUrl || !currentUrl.includes('http'));
// navigate to blank page first to prevent issues with url hash params
browser.url('about:blank');
if (!useExternalFrontend) {
browser.url(url);
console.log('Connecting to: ' + url);
Expand Down

0 comments on commit 5e42b4c

Please sign in to comment.