From 033b974047822ecd9b4921e04a6eac79e7485db3 Mon Sep 17 00:00:00 2001 From: JonahStanley Date: Thu, 20 Jun 2013 10:54:43 -0400 Subject: [PATCH] Fixed flakey show answer test --- lms/djangoapps/courseware/features/problems.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lms/djangoapps/courseware/features/problems.py b/lms/djangoapps/courseware/features/problems.py index 0278ee9b42..094d495b53 100644 --- a/lms/djangoapps/courseware/features/problems.py +++ b/lms/djangoapps/courseware/features/problems.py @@ -135,12 +135,10 @@ def action_button_present(_step, buttonname, doesnt_appear): @step(u'the button with the label "([^"]*)" does( not)? appear') def button_with_label_present(step, buttonname, doesnt_appear): - button_css = 'button span.show-label' - elem = world.css_find(button_css).first if doesnt_appear: - assert_not_equal(elem.text, buttonname) + world.browser.is_text_not_present(buttonname, wait_time=5) else: - assert_equal(elem.text, buttonname) + world.browser.is_text_present(buttonname, wait_time=5) @step(u'My "([^"]*)" answer is marked "([^"]*)"')