Skip to content

Commit

Permalink
Progress?
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Aug 15, 2023
1 parent 7428587 commit fd13041
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
26 changes: 21 additions & 5 deletions lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2116,11 +2116,27 @@ def select_set_value(self, container_selector_or_elem, value, multiple=False):
else:
container_elem = container_selector_or_elem
container_elem.click()
text_input = container_elem.find_element(By.CSS_SELECTOR, "input[class='multiselect__input']")
text_input.send_keys(value)
self.send_enter(text_input)
if multiple:
self.send_escape(text_input)
try:
text_input = container_elem.find_element(By.CSS_SELECTOR, "input[class='multiselect__input']")
except Exception:
text_input = None
if text_input:
text_input.send_keys(value)
self.send_enter(text_input)
if multiple:
self.send_escape(text_input)
else:
self.sleep_for(WAIT_TYPES.UX_RENDER)
elems = container_elem.find_elements(By.CSS_SELECTOR, "[role='option'] .multiselect__option span")
discovered_options = []
found = False
for elem in elems:
elem_value = elem.text
discovered_options.append(elem_value)
if elem_value == value:
elem.click()
found = True
assert found, "Failed to find specified select value [{value}] in browser options [{discovered_options}]"

def select2_set_value(self, container_selector_or_elem, value, with_click=True, clear_value=False):
# There are two hacky was to select things from the select2 widget -
Expand Down
10 changes: 5 additions & 5 deletions lib/galaxy_test/selenium/test_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def test_rules_example_2_list(self):
self.perform_upload(self.get_filename("rules/PRJDA60709.tsv"))
self.history_panel_wait_for_hid_ok(1)
self.upload_rule_start()
self.upload_rule_set_data_type("Collection")
self.upload_rule_set_data_type("Collections")
self.upload_rule_dataset_dialog()
self.upload_rule_set_dataset(1)
self.screenshot("rules_example_2_1_inputs")
Expand All @@ -248,7 +248,7 @@ def test_rules_example_3_list_pairs(self):
self.perform_upload(self.get_filename("rules/PRJDB3920.tsv"))
self.history_panel_wait_for_hid_ok(1)
self.upload_rule_start()
self.upload_rule_set_data_type("Collection")
self.upload_rule_set_data_type("Collections")
self.upload_rule_dataset_dialog()
self.upload_rule_set_dataset(1)
self._wait_for_upload_modal()
Expand Down Expand Up @@ -359,7 +359,7 @@ def test_rules_example_6_nested_lists(self):
self.perform_upload(self.get_filename("rules/PRJNA355367.tsv"))
self.history_panel_wait_for_hid_ok(1)
self.upload_rule_start()
self.upload_rule_set_data_type("Collection")
self.upload_rule_set_data_type("Collections")
self.upload_rule_dataset_dialog()
self.upload_rule_set_dataset(1)

Expand Down Expand Up @@ -437,7 +437,7 @@ def test_rules_deferred_list(self):
self.perform_upload(self.get_filename("rules/PRJNA355367.tsv"))
self.history_panel_wait_for_hid_ok(1)
self.upload_rule_start()
self.upload_rule_set_data_type("Collection")
self.upload_rule_set_data_type("Collections")
self.upload_rule_dataset_dialog()
self.upload_rule_set_dataset(1)

Expand Down Expand Up @@ -491,7 +491,7 @@ def _setup_uniprot_example(self):
self.perform_upload(self.get_filename("rules/uniprot.tsv"))
self.history_panel_wait_for_hid_ok(1)
self.upload_rule_start()
self.upload_rule_set_data_type("Collection")
self.upload_rule_set_data_type("Collections")
self.upload_rule_dataset_dialog()
self.upload_rule_set_dataset(1)

Expand Down

0 comments on commit fd13041

Please sign in to comment.