mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
exercise buggy tour path and assert rendered value in selenium test
Adds a first test case to gx_conditional_boolean that sets the inner boolean_parameter explicitly, so TourGenerator enters the branch that previously crashed on `", ".join([True])`. The selenium test walks the popovers and asserts the inner step renders "Yes" — verifying both the TypeError fix and the Yes/No rendering fix.
This commit is contained in:
@@ -64,12 +64,21 @@ class TestToolDescribingTours(SeleniumTestCase):
|
||||
|
||||
@selenium_test
|
||||
def test_generate_tour_boolean_conditional(self):
|
||||
"""Regression test for https://github.com/galaxyproject/galaxy/issues/22460.
|
||||
|
||||
Generating a tour for a tool whose conditional has a boolean inner parameter
|
||||
(explicitly set in the first test case) previously raised a TypeError.
|
||||
"""
|
||||
self.tool_open("gx_conditional_boolean")
|
||||
self.tool_form_generate_tour()
|
||||
popover_component = self.components.tour.popover._
|
||||
popover_component.wait_for_visible()
|
||||
|
||||
# Intro step: advance to the outer conditional step.
|
||||
popover_component.next.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
# Advance to the inner boolean_parameter case step.
|
||||
popover_component.next.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
|
||||
# tests[0] specifies boolean_parameter="true" → tour should render "Yes".
|
||||
text = popover_component.content.wait_for_visible().text
|
||||
assert "Yes" in text, text
|
||||
|
||||
popover_component.end.wait_for_and_click()
|
||||
popover_component.wait_for_absent_or_hidden()
|
||||
|
||||
@@ -16,6 +16,19 @@
|
||||
</conditional>
|
||||
</inputs>
|
||||
<tests>
|
||||
<test>
|
||||
<conditional name="conditional_parameter">
|
||||
<param name="test_parameter" value="false" />
|
||||
<param name="boolean_parameter" value="true" />
|
||||
</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="true" />
|
||||
</expand>
|
||||
</test>
|
||||
<test>
|
||||
<expand macro="assert_output">
|
||||
<has_line line="test: false" />
|
||||
|
||||
Reference in New Issue
Block a user