From 05ddc50c1a7b0989e100e7ca817a96bad3d68ad7 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 24 Nov 2017 18:11:02 -0500 Subject: [PATCH] Make test more robust - citations take a while to fetch from doi. --- test/selenium_tests/test_tool_form.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/selenium_tests/test_tool_form.py b/test/selenium_tests/test_tool_form.py index 24e56a7b2c2..cf24f953409 100644 --- a/test/selenium_tests/test_tool_form.py +++ b/test/selenium_tests/test_tool_form.py @@ -1,6 +1,7 @@ from galaxy_selenium.navigates_galaxy import retry_call_during_transitions from .framework import ( + retry_assertion_during_transitions, selenium_test, SeleniumTestCase, UsesHistoryItemAssertions, @@ -110,8 +111,15 @@ class ToolFormTestCase(SeleniumTestCase, UsesHistoryItemAssertions): self.home() self.tool_open("bibtex") self.components.tool_form.citations.wait_for_visible() - references = self.components.tool_form.reference.all() - assert len(references) == 26, len(references) + + @retry_assertion_during_transitions + def assert_citations_visible(): + references = self.components.tool_form.reference.all() + assert len(references) == 26, len(references) + return references + + references = assert_citations_visible() + doi_resolved_citation = references[0] assert "Galaxy: A platform for interactive" in doi_resolved_citation.text self.screenshot("tool_form_citations_formatted")