Selemium test for re-running part of dataset collection via DCE

This commit is contained in:
mvdbeek
2023-05-10 16:04:14 +02:00
parent b9bb92cd1f
commit 3ce0a8dd1c
2 changed files with 38 additions and 0 deletions
@@ -242,6 +242,7 @@ history_panel:
tag_area_button: '.details .stateless-tags .multiselect button'
tag_area_input: '.details .stateless-tags .multiselect input'
list_items: '.dataset-collection-panel .listing .content-item'
back_to_history: svg[data-description="back to history"]
selectors:
_: '#current-history-panel'
@@ -492,6 +493,11 @@ tool_form:
parameter_checkbox: 'div.ui-form-element[id="form-element-${parameter}"] .ui-switch'
parameter_input: 'div.ui-form-element[id="form-element-${parameter}"] .ui-input'
parameter_textarea: 'div.ui-form-element[id="form-element-${parameter}"] textarea'
parameter_batch_dataset_collection:
type: xpath
selector: //div[@id='form-element-${parameter}']//i[contains(@class, 'fa-folder-o')]/parent::label
data_option_value: option[value="${item_id}"]
repeat_insert: '[data-description="repeat insert"]'
reference: '.formatted-reference'
about: '.tool-footer'
@@ -114,6 +114,38 @@ class TestToolForm(SeleniumTestCase, UsesHistoryItemAssertions):
self.history_panel_wait_for_hid_ok(2)
self._check_dataset_details_for_inttest_value(2)
@selenium_test
def test_rerun_dataset_collection_element(self):
# upload a first dataset that should not become selected on re-run
test_path = self.get_filename("1.fasta")
self.perform_upload(test_path)
self.history_panel_wait_for_hid_ok(1)
history_id = self.current_history_id()
# upload a nested collection
collection_id = self.dataset_collection_populator.create_list_of_list_in_history(
history_id,
collection_type="list:list",
wait=True,
).json()["id"]
self.tool_open("identifier_multiple")
self.components.tool_form.parameter_batch_dataset_collection(parameter="input1").wait_for_and_click()
self.sleep_for(self.wait_types.UX_RENDER)
self.components.tool_form.data_option_value(item_id=collection_id).wait_for_and_click()
self.sleep_for(self.wait_types.UX_RENDER)
self.tool_form_execute()
self.history_panel_wait_for_hid_ok(7)
self.history_panel_expand_collection(7)
self.sleep_for(self.wait_types.UX_RENDER)
self.history_panel_click_item_title(1)
self.sleep_for(self.wait_types.UX_RENDER)
self.hda_click_primary_action_button(1, "rerun")
self.sleep_for(self.wait_types.UX_RENDER)
assert self.driver.find_element(By.CSS_SELECTOR, "option:checked").text == "Selected: test0"
self.tool_form_execute()
self.components.history_panel.collection_view.back_to_history.wait_for_and_click()
self.history_panel_wait_for_hid_ok(9)
@selenium_test
@flakey
def test_run_data(self):