mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Improvements to library testing.
- Add tests for creating a collection from a library. - Add more class names to library GUI to improve selectors for tests. - Automatically select whichever radio box makes sense in library collection builder dialog based on whether there is a selection or not.
This commit is contained in:
@@ -31,16 +31,11 @@ class LibraryContentsTestCase(SeleniumTestCase):
|
||||
self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_modal)
|
||||
|
||||
self.libraries_dataset_import_from_history()
|
||||
self.wait_for_visible(self.navigation.libraries.folder.selectors.import_history_content)
|
||||
history_elements = self.find_elements(self.navigation.libraries.folder.selectors.import_history_contents_items)
|
||||
assert "1.txt" in history_elements[0].text
|
||||
history_elements[0].find_element_by_css_selector("input").click()
|
||||
self.libraries_dataset_import_from_history_select(["1.txt"])
|
||||
# Add
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.screenshot("libraries_dataset_import")
|
||||
self.wait_for_and_click(self.navigation.libraries.folder.selectors.import_datasets_ok_button)
|
||||
# Let the progress bar disappear...
|
||||
self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_progress_bar)
|
||||
self.libraries_dataset_import_from_history_click_ok()
|
||||
self._assert_num_displayed_items_is(1)
|
||||
|
||||
# Fine test locally but the upload doesn't work in Docker compose. I'd think
|
||||
@@ -103,6 +98,4 @@ class LibraryContentsTestCase(SeleniumTestCase):
|
||||
self.libraries_open()
|
||||
self.name = self._get_random_name(prefix="testcontents")
|
||||
self.libraries_index_create(self.name)
|
||||
self.wait_for_overlays_cleared()
|
||||
self.libraries_index_search_for(self.name)
|
||||
self.libraries_index_table_elements()[0].find_element_by_css_selector("td a").click()
|
||||
self.libraries_open_with_name(self.name)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SharedStateSeleniumTestCase,
|
||||
)
|
||||
|
||||
|
||||
class LibraryToCollectionsTestCase(SharedStateSeleniumTestCase):
|
||||
|
||||
requires_admin = True
|
||||
|
||||
@selenium_test
|
||||
def test_list_creation(self):
|
||||
self.admin_login()
|
||||
self.history_panel_create_new_with_name("new_history_for_library_list")
|
||||
self.libraries_open_with_name(self.name)
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.components.libraries.folder.select_all.wait_for_and_click()
|
||||
self.components.libraries.folder.add_to_history.wait_for_and_click()
|
||||
self.screenshot("libraries_add_to_history_menu")
|
||||
self.components.libraries.folder.add_to_history_collection.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.screenshot("libraries_to_collection_landing")
|
||||
self.components.libraries.folder.import_datasets_ok_button.wait_for_and_click()
|
||||
|
||||
self.collection_builder_set_name("my cool list")
|
||||
self.collection_builder_create()
|
||||
self.home()
|
||||
self.history_panel_wait_for_hid_ok(3)
|
||||
|
||||
def setup_shared_state(self):
|
||||
self.admin_login()
|
||||
self.perform_upload(self.get_filename("1.bed"))
|
||||
self.wait_for_history()
|
||||
self.perform_upload(self.get_filename("2.bed"))
|
||||
self.wait_for_history()
|
||||
|
||||
self.name = self._get_random_name(prefix="testcontents")
|
||||
|
||||
self.libraries_open()
|
||||
self.libraries_index_create(self.name)
|
||||
self.libraries_open_with_name(self.name)
|
||||
|
||||
self.libraries_dataset_import_from_history()
|
||||
self.libraries_dataset_import_from_history_select(["1.bed", "2.bed"])
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.libraries_dataset_import_from_history_click_ok()
|
||||
Reference in New Issue
Block a user