Fix flaky test/integration_selenium/test_toolbox_filters.py::TestToolboxFiltersSeleniumIntegration::test_toolbox_filters

Fixes https://github.com/galaxyproject/galaxy/issues/18832
This commit is contained in:
Ahmed Awan
2024-09-21 23:58:50 -05:00
parent 1633c660a5
commit 9c4b3bc4ae
2 changed files with 4 additions and 0 deletions
@@ -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}"]'
@@ -26,6 +26,8 @@ class TestToolboxFiltersSeleniumIntegration(SeleniumIntegrationTestCase):
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 @@ class TestToolboxFiltersSeleniumIntegration(SeleniumIntegrationTestCase):
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")