diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml index 6c2ecc38481..f2d0890bcaf 100644 --- a/client/src/utils/navigation/navigation.yml +++ b/client/src/utils/navigation/navigation.yml @@ -64,6 +64,7 @@ masthead: histories: 'Histories' invocations: 'Workflow Invocations' pages: 'Pages' + histories_shared_with_me: 'Histories shared with me' # Shared data libraries: 'Data Libraries' @@ -366,6 +367,11 @@ published_histories: tag_content: '#published-histories-table tbody tr .ti-tag .tag-name' column_header: '#published-histories-table thead tr th:nth-child(${column_number})' +shared_histories: + selectors: + _: ".histories-shared-with-you-by-others" + histories: "#grid-table-body tr" + history_copy_elements: selectors: # Following two don't really work as CSS would only work as jQuery/sizzle I think diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index 264e87890cf..fb451c3fe36 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -1055,6 +1055,11 @@ class NavigatesGalaxy(HasDriver): self.click_masthead_user() self.components.masthead.histories.wait_for_and_click() + def navigate_to_histories_shared_with_me_page(self): + self.home() + self.click_masthead_user() + self.components.masthead.histories_shared_with_me.wait_for_and_click() + def navigate_to_user_preferences(self): self.home() self.click_masthead_user() diff --git a/lib/galaxy_test/selenium/test_history_sharing.py b/lib/galaxy_test/selenium/test_history_sharing.py index 27c4e42384b..33f5b3748c2 100644 --- a/lib/galaxy_test/selenium/test_history_sharing.py +++ b/lib/galaxy_test/selenium/test_history_sharing.py @@ -73,6 +73,16 @@ class TestHistorySharing(SeleniumTestCase): self.assert_error_message(contains="You cannot share resources with yourself") self.screenshot("history_sharing_invalid_with_self") + @selenium_test + def test_shared_with_me(self): + user1_email, user2_email, history_id = self.setup_two_users_with_one_shared_history() + self.submit_login(user2_email, retries=VALID_LOGIN_RETRIES) + self.navigate_to_histories_shared_with_me_page() + self.components.shared_histories.selector.wait_for_present() + rows = self.components.shared_histories.histories.all() + assert len(rows) > 0 + assert any(user1_email in row.text for row in rows) + def setup_two_users_with_one_shared_history(self, share_by_id=False): user1_email = self._get_random_email() user2_email = self._get_random_email()