Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix (I think) a transiently failing selenium error. #18065

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading