From d52206826532d368d30c24a2417dbe17f7792073 Mon Sep 17 00:00:00 2001 From: Ben Patterson Date: Sat, 26 Dec 2015 19:42:59 -0500 Subject: [PATCH] Fix flaky condition. TNL-3937. --- cms/djangoapps/contentstore/features/course-export.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cms/djangoapps/contentstore/features/course-export.py b/cms/djangoapps/contentstore/features/course-export.py index 5a0867565d..ae30100382 100644 --- a/cms/djangoapps/contentstore/features/course-export.py +++ b/cms/djangoapps/contentstore/features/course-export.py @@ -53,10 +53,12 @@ def i_click_on_error_dialog(step): problem_string = unicode(world.scenario_dict['COURSE'].id.make_usage_key("problem", 'ignore')) problem_string = u"Problem {}".format(problem_string[:problem_string.rfind('ignore')]) + css_selector = "span.inline-error" + world.wait_for_visible(css_selector) assert_true( - world.css_html("span.inline-error").startswith(problem_string), + world.css_html(css_selector).startswith(problem_string), u"{} does not start with {}".format( - world.css_html("span.inline-error"), problem_string + world.css_html(css_selector), problem_string )) # we don't know the actual ID of the vertical. So just check that we did go to a # vertical page in the course (there should only be one).