Skip to content

Commit 32f49d0

Browse files
jmchiltonclaude
andcommitted
Add tool form E2E test harness driven by XML test definitions
Reuses existing tool <tests> blocks to drive execution through the browser tool form, then verifies outputs with verify() infrastructure. Harness infrastructure (navigates_galaxy.py): - run_tool_test() orchestrates: fetch test def via galaxy_interactor, stage data via stage_inputs(), fill form, execute, verify - Data staging uses stage_inputs() from populators (not bespoke upload), supporting files, collections, binary data, and ftype passthrough - Collection staging converts TestCollectionDef dicts to CWL-like job entries; supports paired, list, and list:paired (nested) types - Job-based output tracking: snapshots pre-execution jobs, finds new job after form submit, fetches outputs by dataset ID via job API - Output collection verification: checks collection_type, element count, and verifies each element's content; supports nested sub-collections - Two-pass input filling: shallow params first (conditionals), then deferred params, data params, collection params last - Type detection via smart components: drilldown, checkbox_select, boolean, color, select, text - Multi-data support: detect FormSelection wrapper, clear auto-selected tags before setting desired value - Smart component selectors in navigation.yml for param type detection and interaction (parameter_checkbox_input, parameter_color_input, parameter_text_input, parameter_drilldown_option, etc.) Test data: - Add test cases to gx_data.xml and gx_repeat_boolean.xml - Fix output name in gx_repeat_data.xml (out_file1 -> output) Test suite (test_tool_form_harness.py) — 30 tests: - Scalar params: int, float, text, select, boolean, color - Composite params: conditional (select + boolean), section, repeat, drilldown, multi-select checkboxes, data column, multi-data - Data: single file, optional absent, multi-output, multi-repeats - Collections: paired, list, list:paired input; paired and list:paired output verification; mixed collection+data; optional absent collection - Integration: simple_constructs, implicit_default_conds Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ec9efa2 commit 32f49d0

7 files changed

Lines changed: 666 additions & 4 deletions

File tree

client/src/utils/navigation/navigation.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,17 @@ tool_form:
669669
parameter_data_label: 'div.ui-form-element[id="form-element-${parameter}"] [data-description="form data label"]'
670670
parameter_data_select: 'div.ui-form-element[id="form-element-${parameter}"] .multiselect'
671671

672+
parameter_checkbox_input: 'div.ui-form-element[id="form-element-${parameter}"] input[type="checkbox"]'
673+
parameter_color_input: 'div.ui-form-element[id="form-element-${parameter}"] input[type="color"]'
674+
parameter_text_input: 'div.ui-form-element[id="form-element-${parameter}"] input'
675+
parameter_form_selection: 'div.ui-form-element[id="form-element-${parameter}"] .form-selection'
676+
parameter_multiselect_tag_close: 'div.ui-form-element[id="form-element-${parameter}"] i.multiselect__tag-icon'
677+
parameter_drilldown_option: 'div.ui-form-element[id="form-element-${parameter}"] #drilldown-option-${value}'
678+
672679
repeat_insert: '[data-description="repeat insert"]'
673680
repeat_move_up: '#${parameter}_up'
674681
repeat_move_down: '#${parameter}_down'
682+
section_header: '.ui-portlet-section .portlet-header'
675683
reference: '.formatted-reference'
676684
about: '.tool-footer'
677685
storage_options: '.tool-storage'

lib/galaxy/selenium/navigates_galaxy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,14 +2143,14 @@ def tool_parameter_edit_rules(self):
21432143
edit_button_element = rules_div_element.find_element(By.CSS_SELECTOR, ".form-rules-edit button")
21442144
edit_button_element.click()
21452145

2146-
def tool_set_value(self, expanded_parameter_id, value, expected_type=None):
2146+
def tool_set_value(self, expanded_parameter_id, value, expected_type=None, multiple=False):
21472147
div_element = self.tool_parameter_div(expanded_parameter_id)
21482148
assert div_element
21492149
if expected_type in ["select", "data", "data_collection"]:
21502150
select_field = self.components.tool_form.parameter_data_select(
21512151
parameter=expanded_parameter_id
21522152
).wait_for_visible()
2153-
self.select_set_value(select_field, value)
2153+
self.select_set_value(select_field, value, multiple=multiple)
21542154
else:
21552155
input_element = div_element.find_element(By.CSS_SELECTOR, "input")
21562156
# Clear default value

0 commit comments

Comments
 (0)