Skip to content

Commit

Permalink
More progress on testing...
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Feb 5, 2025
1 parent 3af8bd8 commit 8bc2b7e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
8 changes: 7 additions & 1 deletion lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,12 @@ def history_panel_build_list_of_pairs(self):
list_wizard.auto_pairing.wait_for_visible()
list_wizard.wizard_next_button.wait_for_and_click()

def history_panel_build_rule_builder_for_selection(self):
self.history_panel_build_list_advanced()
list_wizard = self.components.collection_builders.list_wizard
list_wizard.which_builder(builder="rules").wait_for_and_click()
list_wizard.wizard_next_button.wait_for_and_click()

def collection_builder_set_name(self, name):
# small sleep here seems to be needed in the case of the
# collection builder even though we wait for the component
Expand All @@ -2065,7 +2071,7 @@ def collection_builder_hide_originals(self):
def collection_builder_create(self):
list_wizard_create = self.components.collection_builders.list_wizard.create
modal_create = self.components.collection_builders.modals.create
if list_wizard_create.is_displayed:
if not list_wizard_create.is_absent:
list_wizard_create.wait_for_and_click()
else:
modal_create.wait_for_and_click()
Expand Down
53 changes: 38 additions & 15 deletions lib/galaxy_test/selenium/test_collection_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,42 @@ def test_build_paired_list_manual_matched(self):
row0.unlink_button.wait_for_present()
row0.link_button.assert_absent()

self.collection_builder_set_name("my awesome paired list manual match")
self.screenshot("collection_builder_paired_list_manual_match")
self.collection_builder_create()
self._wait_for_hid_visible(5)
# switch to hidden filters to see the hidden datasets appear
self._show_hidden_content()
self._wait_for_hid_visible(1)
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)
self._wait_for_hid_visible(4)

@selenium_test
@managed_history
def test_build_paired_list_show_original(self):
self.perform_upload(self.get_filename("1.tabular"))
self.perform_upload(self.get_filename("2.tabular"))
self.perform_upload_of_pasted_content(
{
"thisdoesnotmatch.fasta": "forward content",
"becausethenamesarentalike.fasta": "reverse content",
}
)
self._wait_for_and_select([1, 2])
self._collection_dropdown("build list of pairs")
collection_builders = self.components.collection_builders
self.ensure_collection_builder_filters_cleared()
forward_column = collection_builders.forward_datasets.wait_for_visible()
first_datset_forward = forward_column.find_elements(self.by.CSS_SELECTOR, "li")[0]
first_datset_forward.click()
reverse_column = collection_builders.reverse_datasets.wait_for_visible()
second_dataset_reverse = reverse_column.find_elements(self.by.CSS_SELECTOR, "li")[1]
second_dataset_reverse.click()
self.history_panel_build_list_of_pairs()

row0 = self.components.collection_builders.list_wizard.row._(index=0)
row1 = self.components.collection_builders.list_wizard.row._(index=1)

row0.unlink_button.assert_absent()

row0.link_button.wait_for_and_click()
row1.link_button.wait_for_and_click()

row0.unlink_button.wait_for_present()
row0.link_button.assert_absent()

self.collection_builder_hide_originals()
self.collection_builder_set_name("my awesome paired list")
self.collection_builder_set_name("my awesome paired list shown originals")
self.collection_builder_create()
self._wait_for_hid_visible(5)
self._wait_for_hid_visible(1)
Expand All @@ -103,10 +122,14 @@ def test_build_paired_list_show_original(self):
@selenium_test
@managed_history
def test_build_simple_list_via_rules_hidden(self):
self.perform_upload(self.get_filename("1.fasta"))
self.perform_upload_of_pasted_content(
{
"1.fasta": "fasta content",
}
)
self._wait_for_and_select([1])
self._collection_dropdown("build collection from rules")
self.collection_builder_set_name("my cool list")
self.history_panel_build_rule_builder_for_selection()
self.collection_builder_set_name("my cool list from rules originals hidden")
self.screenshot("collection_builder_rules_list")
self.collection_builder_create()
self._wait_for_hid_visible(3)
Expand Down

0 comments on commit 8bc2b7e

Please sign in to comment.