Skip to content

Commit

Permalink
Merge pull request #18065 from jmchilton/selenium_fix_2024_0
Browse files Browse the repository at this point in the history
Fix (I think) a transiently failing selenium error.
  • Loading branch information
davelopez authored Apr 29, 2024
2 parents 9547709 + b11506a commit ca4d90a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ def _retry(*args, **kwds):
return _retry


def retry_index_during_transitions():

def exception_check(e):
return exception_seems_to_indicate_transition(e) or isinstance(e, IndexError)

return partial(retry_during_transitions, exception_check=exception_check)


def edit_details(f, scope=".history-index"):
"""Open the editor, run the edits, hit the save button"""

Expand Down Expand Up @@ -1421,7 +1429,12 @@ def workflow_card_elements(self):
return self.components.workflows.workflow_card.all()

def workflow_card_element(self, workflow_index=0):
return self.workflow_card_elements()[workflow_index]

@retry_index_during_transitions()
def fetch():
return self.workflow_card_elements()[workflow_index]

return fetch()

@retry_during_transitions
def workflow_index_column_text(self, column_index, workflow_index=0):
Expand Down

0 comments on commit ca4d90a

Please sign in to comment.