Files
galaxy/test/functional/tools/parameters/gx_repeat_boolean.xml
T
John ChiltonandClaude Opus 4.6 32f49d0f6c 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>
2026-03-17 21:56:32 -04:00

26 lines
762 B
XML

<tool id="gx_repeat_boolean" name="gx_repeat_boolean" version="1.0.0">
<command><![CDATA[
echo '$parameter[0].boolean_parameter' >> '$output'
]]></command>
<inputs>
<repeat name="parameter" title="Repeat Parameter">
<param name="boolean_parameter" type="boolean" />
</repeat>
</inputs>
<outputs>
<data name="output" format="txt" />
</outputs>
<tests>
<test>
<repeat name="parameter">
<param name="boolean_parameter" value="true" />
</repeat>
<output name="output">
<assert_contents>
<has_line line="true" />
</assert_contents>
</output>
</test>
</tests>
</tool>