From 3aeeb47e8d9729da5ec643c0809cbb3a24f0382d Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 19 Apr 2022 12:12:32 -0400 Subject: [PATCH] More robust is_beta_history() check. Given error on https://github.com/galaxyproject/galaxy/runs/6068791674?check_suite_focus=true, I assume what happened is the beta history panel wasn't on the page so the test tried to act on the old history panel. --- lib/galaxy/selenium/navigates_galaxy.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index 160c16e51a7..6fae6815462 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -1435,7 +1435,16 @@ class NavigatesGalaxy(HasDriver): self.components.history_panel.beta.wait_for_present() def is_beta_history(self): - return not self.components.history_panel.beta.is_absent + old_panel = self.components.history_panel.beta.is_absent + new_panel = self.components.history_panel.new_history_button.is_absent + if old_panel and new_panel: + # both absent, let page render a bit... + self.sleep_for(self.wait_types.UX_RENDER) + else: + return new_panel + + old_panel = self.components.history_panel.beta.is_absent + return not old_panel # avoids problematic ID and classes on markup def beta_history_element(self, attribute_value, attribute_name="data-description", scope=".history-index"):