From 70934cd276a50c309802b0a072ae454adc8a1029 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 19 Mar 2021 19:10:53 +0100 Subject: [PATCH] Add selenium test for data column parameters in workflow editor --- lib/galaxy/selenium/navigation.yml | 1 + .../selenium/test_workflow_editor.py | 28 +++++++++++++++++++ test/functional/tools/column_param_list.xml | 4 +-- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/selenium/navigation.yml b/lib/galaxy/selenium/navigation.yml index 2c201cdd3d3..2d1effc20ba 100644 --- a/lib/galaxy/selenium/navigation.yml +++ b/lib/galaxy/selenium/navigation.yml @@ -360,6 +360,7 @@ tool_form: options: '#options [data-toggle="dropdown"]' execute: 'button#execute' parameter_div: 'div.ui-form-element[tour_id="${parameter}"]' + parameter_textarea: 'div.ui-form-element[tour_id="${parameter}"] textarea' reference: '.formatted-reference' about: '.tool-footer' diff --git a/lib/galaxy_test/selenium/test_workflow_editor.py b/lib/galaxy_test/selenium/test_workflow_editor.py index b9fd476b2ed..6e476032a25 100644 --- a/lib/galaxy_test/selenium/test_workflow_editor.py +++ b/lib/galaxy_test/selenium/test_workflow_editor.py @@ -137,6 +137,34 @@ class WorkflowEditorTestCase(SeleniumTestCase): self.sleep_for(self.wait_types.UX_RENDER) self.screenshot("workflow_editor_data_collection_input_deleted") + @selenium_test + def test_data_column_input_editing(self): + self.open_in_workflow_editor(""" +class: GalaxyWorkflow +steps: + column_param_list: + tool_id: column_param_list + state: + col: ["1","2","3"] + col_names: ["a", "b", "c"] + """) + editor = self.components.workflow_editor + node = editor.node._(label="column_param_list") + node.title.wait_for_and_click() + columns = self.components.tool_form.parameter_textarea(parameter='col') + textarea_columns = columns.wait_for_visible() + assert textarea_columns.get_attribute('value') == '1\n2\n3\n' + column_names = self.components.tool_form.parameter_textarea(parameter='col_names') + textarea_column_names = column_names.wait_for_visible() + assert textarea_column_names.get_attribute('value') == 'a\nb\nc\n' + self.set_text_element(columns, '4\n5\n6\n') + self.assert_has_changes_and_save() + self.sleep_for(self.wait_types.UX_RENDER) + self.driver.refresh() + node.title.wait_for_and_click() + textarea_columns = columns.wait_for_visible() + assert textarea_columns.get_attribute('value') == '4\n5\n6\n' + @selenium_test def test_integer_input(self): editor = self.components.workflow_editor diff --git a/test/functional/tools/column_param_list.xml b/test/functional/tools/column_param_list.xml index a3c8d99e4f6..74f8e2e4c5a 100644 --- a/test/functional/tools/column_param_list.xml +++ b/test/functional/tools/column_param_list.xml @@ -6,8 +6,8 @@ echo "col_names $col_names" >> '$output2' ]]> - - + +