Skip to content

Commit

Permalink
Adjust selenium tests with regard to updated user dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed May 30, 2024
1 parent e7ddeb8 commit b59ff35
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
3 changes: 3 additions & 0 deletions client/src/stores/activityStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jest.mock("./activitySetup", () => ({
id: "a-id",
mutable: false,
optional: false,
panel: true,
title: "a-title",
to: null,
tooltip: "a-tooltip",
Expand All @@ -28,6 +29,7 @@ const newActivities = [
id: "a-id",
mutable: false,
optional: false,
panel: true,
title: "a-title",
to: "a-to-new",
tooltip: "a-tooltip-new",
Expand All @@ -40,6 +42,7 @@ const newActivities = [
id: "b-id",
mutable: true,
optional: false,
panel: true,
title: "b-title-new",
to: "b-to-new",
tooltip: "b-tooltip-new",
Expand Down
24 changes: 11 additions & 13 deletions client/src/utils/navigation/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,24 @@ masthead:
selectors:
_: '#masthead'

# bootstrap-vue a tag doesn't work as link target, need to hit span inside
user: '#user.loggedin-only > a.nav-link > span'
register_or_login: '#user.loggedout-only > .nav-link'
logout: '#user.loggedin-only > .nav-link'
home: '#analysis'
help: '#help'
login: '#user'
home: '#analysis'
libraries: '#library'
window_manager: '#enable-window-manager'
workflow: '#workflow .nav-link'

username:
type: xpath
selector: '//a[contains(text(), "Signed in as")]'

login: '#user'
logout: '.dropdown-menu > li > a > .fa-sign-out-alt'
logged_in_only: '.loggedin-only'
logged_out_only: '.loggedout-only'
preferences: '.dropdown-menu > li > a > .fa-gear'
register_or_login: '#user.loggedout-only > .nav-link'
storage_dashboard_link:
selector: 'storage dashboard link'
type: data-description
user: '#user.loggedin-only > a.nav-link > .fa'
username:
type: xpath
selector: '//a[contains(text(), "Signed in as")]'
window_manager: '#enable-window-manager'
workflow: '#workflow .nav-link'

preferences:
selectors:
Expand Down
5 changes: 3 additions & 2 deletions lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,8 +1247,8 @@ def navigate_to_histories_shared_with_me_page(self):

def navigate_to_user_preferences(self):
self.home()
self.components.preferences.activity.wait_for_and_click()
self.components.preferences.activity_expand.wait_for_and_click()
self.components.masthead.user.wait_for_and_click()
self.components.masthead.preferences.wait_for_and_click()

def navigate_to_invocations(self):
self.home()
Expand Down Expand Up @@ -1989,6 +1989,7 @@ def logout_if_needed(self):

def logout(self):
self.components.masthead.logged_in_only.wait_for_visible()
self.components.masthead.user.wait_for_and_click()
self.components.masthead.logout.wait_for_and_click()
try:
self.components.masthead.logged_out_only.wait_for_visible()
Expand Down

0 comments on commit b59ff35

Please sign in to comment.