From 0528097806b65f8f6ffc09d88738e7b4b8be3c8b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Mon, 30 Mar 2026 12:17:03 +0200 Subject: [PATCH] Fix test_refresh_preserves_state not waiting for collapse history_panel_click_item_title was called with wait=False when collapsing dataset details. This returned immediately after clicking, without waiting for the GCollapse animation to complete or the ExpandedItems store to persist the collapsed state to sessionStorage. The subsequent navigation (self.home()) could then race ahead of the state persistence, causing the item to appear expanded after refresh. Fix: use wait=True so the click waits for details_component.wait_for_absent_or_hidden(), matching the pattern already used for expanding in the same test. --- lib/galaxy_test/selenium/test_history_panel.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/galaxy_test/selenium/test_history_panel.py b/lib/galaxy_test/selenium/test_history_panel.py index d0a93fefab0..f21a8029e55 100644 --- a/lib/galaxy_test/selenium/test_history_panel.py +++ b/lib/galaxy_test/selenium/test_history_panel.py @@ -156,7 +156,6 @@ class TestHistoryPanel(SeleniumTestCase): close_btn.click() self.sleep_for(self.wait_types.UX_RENDER) - @selenium_only("Not yet migrated to support Playwright backend") @selenium_test def test_refresh_preserves_state(self): self.perform_upload(self.get_filename("1.txt")) @@ -175,7 +174,7 @@ class TestHistoryPanel(SeleniumTestCase): assert self.history_panel_item_showing_details(hid=1) # Close the detailed display, refresh, and ensure they are still closed. - self.history_panel_click_item_title(hid=1, wait=False) + self.history_panel_click_item_title(hid=1, wait=True) assert not self.history_panel_item_showing_details(hid=1) self._refresh()