From f5a58c13876cc1f29c887159f09bedf8c5feea58 Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Wed, 24 Jul 2024 09:42:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F:=20update=20`test=5Flibra?= =?UTF-8?q?ry=5Fcontents`=20to=20work=20with=20`HistoryDatasetPicker`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../selenium/test_library_contents.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/galaxy_test/selenium/test_library_contents.py b/lib/galaxy_test/selenium/test_library_contents.py index 19b26825e1ce..cebf2f0bd489 100644 --- a/lib/galaxy_test/selenium/test_library_contents.py +++ b/lib/galaxy_test/selenium/test_library_contents.py @@ -69,14 +69,14 @@ def test_import_dataset_from_history(self): self.sleep_for(self.wait_types.UX_RENDER) self.libraries_dataset_import(self.navigation.libraries.folder.labels.from_history) # Click the cancel button, make sure modal is hidden. - self.wait_for_visible(self.navigation.libraries.folder.selectors.import_modal) - self.wait_for_and_click(self.navigation.libraries.folder.selectors.import_datasets_cancel_button) - self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_modal) + self.wait_for_visible(self.navigation.libraries.folder.selectors.import_datasets_from_history_modal) + self.wait_for_and_click(self.navigation.libraries.folder.selectors.import_datasets_from_history_modal_cancel) + self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_datasets_from_history_modal) self.libraries_dataset_import(self.navigation.libraries.folder.labels.from_history) - # Need to select the right item on the dropdown + # Need to search for the history and select it before we can select datasets. self.sleep_for(self.wait_types.UX_RENDER) - self._select_history_option("Unnamed history") + self._search_and_select_history(1, "Unnamed history") self.sleep_for(self.wait_types.UX_RENDER) self.libraries_dataset_import_from_history_select(["1.txt"]) # Add @@ -186,6 +186,7 @@ def test_show_details(self): self.screenshot("libraries_show_details_done") @retry_during_transitions - def _select_history_option(self, label_text): - select = self.components.libraries.folder.add_history_items.wait_for_select() - select.select_by_visible_text(label_text) + def _search_and_select_history(self, row_index=1, label_text="Unnamed history"): + self.libraries_dataset_import_from_history_search_for(label_text) + self.sleep_for(self.wait_types.UX_RENDER) + self.components.libraries.folder.import_datasets_from_history_modal_select_list_item_by_index(row_index=row_index).wait_for_and_click()