From 547eb71dffd21947ba73ae788b2f81901113ea3b Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 21 Nov 2020 16:57:50 -0500 Subject: [PATCH] Update selenium histories for sharing changes in #10754. --- client/src/components/Sharing.vue | 10 ++++++++-- lib/galaxy/selenium/navigates_galaxy.py | 4 ++++ lib/galaxy/selenium/navigation.yml | 3 ++- lib/galaxy_test/selenium/test_histories_list.py | 2 +- .../selenium/test_published_histories_grid.py | 3 +-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/client/src/components/Sharing.vue b/client/src/components/Sharing.vue index d9c97a05a04..68ff43031bd 100644 --- a/client/src/components/Sharing.vue +++ b/client/src/components/Sharing.vue @@ -11,10 +11,16 @@ Set Username
- + Make {{ model_class }} accessible. - + Make {{ model_class }} publicly available in Published {{ plural_name }} section. diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index 28a0b31f1a5..141faf288cb 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -216,6 +216,10 @@ class NavigatesGalaxy(HasDriver): def history_panel_name(self): return self.history_panel_name_element().text + def make_accessible_and_publishable(self): + self.components.histories.sharing.make_accessible.wait_for_and_click() + self.components.histories.sharing.make_publishable.wait_for_and_click() + def history_contents(self, history_id=None, view='summary', datasets_only=True): if history_id is None: history_id = self.current_history_id() diff --git a/lib/galaxy/selenium/navigation.yml b/lib/galaxy/selenium/navigation.yml index 46a9eced415..d47a7aac9c3 100644 --- a/lib/galaxy/selenium/navigation.yml +++ b/lib/galaxy/selenium/navigation.yml @@ -286,7 +286,8 @@ histories: selectors: unshare_user_button: '.unshare_user' share_with_a_user_button: '#share_with_a_user' - make_accessible_and_publish: '#make_accessible_and_publish' + make_accessible: '.make-accessible label' + make_publishable: '.make-publishable label' labels: unshare: 'Unshare' diff --git a/lib/galaxy_test/selenium/test_histories_list.py b/lib/galaxy_test/selenium/test_histories_list.py index 0811295084f..56f9f14587b 100644 --- a/lib/galaxy_test/selenium/test_histories_list.py +++ b/lib/galaxy_test/selenium/test_histories_list.py @@ -43,7 +43,7 @@ class SavedHistoriesTestCase(SharedStateSeleniumTestCase): # Publish the history self.click_grid_popup_option(self.history2_name, 'Share or Publish') - self.components.histories.sharing.make_accessible_and_publish.wait_for_and_click() + self.make_accessible_publishable() self.navigate_to_histories_page() diff --git a/lib/galaxy_test/selenium/test_published_histories_grid.py b/lib/galaxy_test/selenium/test_published_histories_grid.py index 6e3ca8596bf..b191c52cde5 100644 --- a/lib/galaxy_test/selenium/test_published_histories_grid.py +++ b/lib/galaxy_test/selenium/test_published_histories_grid.py @@ -199,8 +199,7 @@ class HistoryGridTestCase(SharedStateSeleniumTestCase): def publish_current_history(self): self.click_history_option('Share or Publish') - self.components.histories.sharing.make_accessible_and_publish.wait_for_and_click() - self.wait_for_selector_clickable('#disable_link_access_and_unpublish') + self.make_accessible_and_publishable() def navigate_to_published_histories_page(self): self.home()