Skip to content

Commit

Permalink
More selenium adjustments, using the activity bar to navigate instead…
Browse files Browse the repository at this point in the history
… of the masthead
  • Loading branch information
guerler committed May 27, 2024
1 parent 99ad54e commit aef20df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 28 deletions.
7 changes: 6 additions & 1 deletion client/src/utils/navigation/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ 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'

user_menu: '#user .dropdown-menu a'
workflow: '#workflow .nav-link'
Expand All @@ -66,7 +67,6 @@ masthead:
workflow: 'Workflow'

# user menu
logout: 'Sign Out'
preferences: 'Preferences'

# data menu
Expand All @@ -78,6 +78,8 @@ masthead:

preferences:
selectors:
activity: "#activity-settings"
activity_expand: ".activity-panel-footer"
sign_out: "#edit-preferences-sign-out"
change_password: "#edit-preferences-password"
manage_information: '#edit-preferences-information'
Expand Down Expand Up @@ -457,6 +459,7 @@ collection_builders:

histories:
selectors:
activity: '#activity-histories'
advanced_search_toggle: '#histories-grid [data-description="toggle advanced search"]'
advanced_search_name_input: '#histories-advanced-filter-name'
advanced_search_tag_area: '#histories-advanced-filter-tag .stateless-tags button'
Expand Down Expand Up @@ -532,6 +535,7 @@ history_import:

pages:
selectors:
activity: "#activity-pages"
create: '#page-create'
submit: '#submit'
create_title_input: '#form-element-title input'
Expand Down Expand Up @@ -856,6 +860,7 @@ workflow_show:

invocations:
selectors:
activity: "#activity-invocation"
invocations_table: '#invocations-grid .grid-table'
invocations_table_rows: '#invocations-grid .grid-table [data-description="grid item"]'
pager: '[data-description="grid pager"]'
Expand Down
35 changes: 8 additions & 27 deletions lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,48 +1237,37 @@ def workflow_editor_click_save(self):

def navigate_to_histories_page(self):
self.home()
self.click_masthead_data()
self.components.masthead.histories.wait_for_and_click()
self.components.histories.activity.wait_for_and_click()
self.components.histories.histories.wait_for_present()

def navigate_to_histories_shared_with_me_page(self):
self.home()
self.click_masthead_data()
self.components.masthead.histories.wait_for_and_click()
self.components.histories.activity.wait_for_and_click()
self.components.shared_histories.tab.wait_for_and_click()

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

def navigate_to_invocations(self):
self.home()
self.click_masthead_data()
self.components.masthead.invocations.wait_for_and_click()
self.components.invocations.activity.wait_for_and_click()

def navigate_to_pages(self):
self.home()
self.click_masthead_data()
self.components.masthead.pages.wait_for_and_click()
self.components.pages.activity.wait_for_and_click()

def navigate_to_published_workflows(self):
self.home()
self.click_masthead_data()
self.components.masthead.workflows.wait_for_and_click()
self.components.workflows.activity.wait_for_and_click()
self.components.workflows.published_tab.wait_for_and_click()

def navigate_to_published_histories(self):
self.home()
self.click_masthead_data()
self.components.masthead.histories.wait_for_and_click()
self.components.histories.activity.wait_for_and_click()
self.components.published_histories.tab.wait_for_and_click()

def navigate_to_published_pages(self):
self.home()
self.click_masthead_data()
self.components.masthead.pages.wait_for_and_click()

def admin_open(self):
self.components.admin.activity.wait_for_and_click()

Expand Down Expand Up @@ -1329,7 +1318,6 @@ def create_new_library(self):

def libraries_open(self):
self.home()
self.click_masthead_data()
self.components.masthead.libraries.wait_for_and_click()
self.components.libraries.selector.wait_for_visible()

Expand Down Expand Up @@ -1713,12 +1701,6 @@ def tool_form_generate_tour(self):
def tool_form_execute(self):
self.components.tool_form.execute.wait_for_and_click()

def click_masthead_user(self):
self.components.masthead.user.wait_for_and_click()

def click_masthead_data(self):
self.components.masthead.data.wait_for_and_click()

def click_activity_workflow(self):
self.components.workflows.activity.wait_for_and_click()

Expand Down Expand Up @@ -2002,7 +1984,6 @@ def logout_if_needed(self):

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

0 comments on commit aef20df

Please sign in to comment.