From 7fd66124f7eed94a788a5491cd44aae128096dcd Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 17 Mar 2026 06:48:37 -0400 Subject: [PATCH] Fix flaky assert_node_output_is with retry instead of sleep Add @retry_assertion_during_transitions + dismiss stale tooltip before hover so retries get fresh text. Remove UX_RENDER sleep hacks from workflow_editor_connect. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/galaxy/selenium/navigates_galaxy.py | 4 ---- lib/galaxy_test/selenium/test_workflow_editor.py | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index c1d2f2dd40c..221da860373 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -1445,10 +1445,6 @@ class NavigatesGalaxy(HasDriverProxy[WaitType]): self.sleep_for(self.wait_types.UX_RENDER) self.screenshot(screenshot_partial) self.drag_and_drop(source_element, sink_element) - if self._driver_impl.backend_type == "playwright": - # dispatch_event is synchronous but Vue reactivity (store updates, - # terminal type recalculation) runs in microtasks — wait for it. - self.sleep_for(self.wait_types.UX_RENDER) def workflow_editor_source_sink_terminal_ids(self, source, sink): editor = self.components.workflow_editor diff --git a/lib/galaxy_test/selenium/test_workflow_editor.py b/lib/galaxy_test/selenium/test_workflow_editor.py index 81e650bdcba..0c791d161cb 100644 --- a/lib/galaxy_test/selenium/test_workflow_editor.py +++ b/lib/galaxy_test/selenium/test_workflow_editor.py @@ -1515,11 +1515,14 @@ steps: return (int(width_stripped), int(height_stripped)) + @retry_assertion_during_transitions def assert_node_output_is(self, label: str, output_type: str, subcollection_type: Optional[str] = None): editor = self.components.workflow_editor node_label, output_name = label.split("#") node = editor.node._(label=node_label) node.wait_for_present() + # Dismiss any stale tooltip before hovering so retry gets fresh text + self.click_center() output_element = node.output_terminal(name=output_name).wait_for_visible() self.hover_over(output_element) element = self.components._.tooltip_inner.wait_for_present()