Files
galaxy/test/functional/tools/parameters/gx_conditional_boolean_checked.xml
T
2024-07-15 09:46:13 -04:00

54 lines
2.2 KiB
XML

<tool id="gx_conditional_boolean_checked" name="gx_conditional_boolean_checked" version="1.0.0">
<macros>
<import>macros.xml</import>
</macros>
<expand macro="common_conditional_tags" />
<inputs>
<conditional name="conditional_parameter">
<!-- boolean parameters as the test parameter are discouraged, respect linting and don't do this -->
<param name="test_parameter" type="boolean" checked="true" />
<when value="true">
<param name="integer_parameter" type="integer" value="1" />
</when>
<when value="false">
<param name="boolean_parameter" type="boolean" />
</when>
</conditional>
</inputs>
<tests>
<test>
<expand macro="assert_output">
<has_line line="test: true" />
</expand>
<expand macro="assert_inputs_json">
<has_json_property_with_value property="test_parameter" value="true" />
<has_json_property_with_value property="integer_parameter" value="1" />
</expand>
</test>
<test>
<conditional name="conditional_parameter">
<param name="test_parameter" value="true" />
</conditional>
<expand macro="assert_output">
<has_line line="test: true" />
</expand>
<expand macro="assert_inputs_json">
<has_json_property_with_value property="test_parameter" value="true" />
<has_json_property_with_value property="integer_parameter" value="1" />
</expand>
</test>
<test>
<conditional name="conditional_parameter">
<param name="test_parameter" value="false" />
</conditional>
<expand macro="assert_output">
<has_line line="test: false" />
</expand>
<expand macro="assert_inputs_json">
<has_json_property_with_value property="test_parameter" value="false" />
<has_json_property_with_value property="boolean_parameter" value="false" />
</expand>
</test>
</tests>
</tool>