From 9c4b3bc4ae4d49aa6ed29a20e7c2ea85e95dd477 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Thu, 19 Sep 2024 11:29:19 -0500 Subject: [PATCH 1/2] Fix flaky `test/integration_selenium/test_toolbox_filters.py::TestToolboxFiltersSeleniumIntegration::test_toolbox_filters` Fixes https://github.com/galaxyproject/galaxy/issues/18832 --- client/src/utils/navigation/navigation.yml | 1 + test/integration_selenium/test_toolbox_filters.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/client/src/utils/navigation/navigation.yml b/client/src/utils/navigation/navigation.yml index 69e06bdb21e3..564d617903d3 100644 --- a/client/src/utils/navigation/navigation.yml +++ b/client/src/utils/navigation/navigation.yml @@ -374,6 +374,7 @@ edit_collection_attributes: tool_panel: selectors: + tool_box: '[data-description="panel toolbox"]' tool_link: 'a[href$$="tool_runner?tool_id=${tool_id}"]' outer_tool_link: '.toolTitle a[href$$="tool_runner?tool_id=${tool_id}"]' data_source_tool_link: 'a[href$$="tool_runner/data_source_redirect?tool_id=${tool_id}"]' diff --git a/test/integration_selenium/test_toolbox_filters.py b/test/integration_selenium/test_toolbox_filters.py index 2c61729c0d0e..460f83efd325 100644 --- a/test/integration_selenium/test_toolbox_filters.py +++ b/test/integration_selenium/test_toolbox_filters.py @@ -26,6 +26,8 @@ def test_toolbox_filters(self): the specified section is no longer displayed in the browser. """ self.register() + self.sleep_for(self.wait_types.UX_RENDER) + self.components.tool_panel.tool_box.wait_for_visible() # The tool panel section should be visible and clickable at this stage section = self.driver.find_element(By.LINK_TEXT, "Test Section") self.action_chains().move_to_element(section).click().perform() @@ -41,6 +43,7 @@ def test_toolbox_filters(self): self.components.toolbox_filters.submit.wait_for_and_click() self.sleep_for(self.wait_types.UX_RENDER) self.home() + self.components.tool_panel.tool_box.wait_for_visible() # But now it should raise NoSuchElementException with self.assertRaises(NoSuchElementException): self.driver.find_element(By.LINK_TEXT, "Test Section") From 408366d419aa5a178a10189e471f91009d1ec65b Mon Sep 17 00:00:00 2001 From: Ahmed Hamid Awan Date: Thu, 19 Sep 2024 12:21:32 -0500 Subject: [PATCH 2/2] remove redundant sleep for Co-authored-by: Marius van den Beek --- test/integration_selenium/test_toolbox_filters.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/integration_selenium/test_toolbox_filters.py b/test/integration_selenium/test_toolbox_filters.py index 460f83efd325..f23c6342c041 100644 --- a/test/integration_selenium/test_toolbox_filters.py +++ b/test/integration_selenium/test_toolbox_filters.py @@ -26,7 +26,6 @@ def test_toolbox_filters(self): the specified section is no longer displayed in the browser. """ self.register() - self.sleep_for(self.wait_types.UX_RENDER) self.components.tool_panel.tool_box.wait_for_visible() # The tool panel section should be visible and clickable at this stage section = self.driver.find_element(By.LINK_TEXT, "Test Section")