From e453fdcceeb1bc435efa1126d864692ccf362252 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 23 Apr 2026 12:54:32 +0200 Subject: [PATCH] exercise buggy tour path and assert rendered value in selenium test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../selenium/test_tool_describing_tours.py | 19 ++++++++++++++----- .../parameters/gx_conditional_boolean.xml | 13 +++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/lib/galaxy_test/selenium/test_tool_describing_tours.py b/lib/galaxy_test/selenium/test_tool_describing_tours.py index a428b00269b..89212814b8a 100644 --- a/lib/galaxy_test/selenium/test_tool_describing_tours.py +++ b/lib/galaxy_test/selenium/test_tool_describing_tours.py @@ -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() diff --git a/test/functional/tools/parameters/gx_conditional_boolean.xml b/test/functional/tools/parameters/gx_conditional_boolean.xml index 7c5feffab0e..7008e1c4a6f 100644 --- a/test/functional/tools/parameters/gx_conditional_boolean.xml +++ b/test/functional/tools/parameters/gx_conditional_boolean.xml @@ -16,6 +16,19 @@ + + + + + + + + + + + + +