From 73ba1e547ed5b46eae4b4af022832ce751ed4fac Mon Sep 17 00:00:00 2001 From: cahrens Date: Mon, 17 Jun 2013 15:46:10 -0400 Subject: [PATCH] Change code to use css_click in hopes that will make the test pass on Don's mac. css_click will try clicking multiple times. --- .../contentstore/features/problem-editor.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index 7c1500b557..8691a6772e 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -161,8 +161,7 @@ def create_latex_problem(step): @step('I edit and compile the High Level Source') def edit_latex_source(step): - world.css_click('a.edit-button') - world.css_find('.launch-latex-compiler').find_by_css('a').click() + open_high_level_source() type_in_codemirror(1, "hi") world.css_click('.hls-compile') @@ -177,8 +176,7 @@ def high_level_source_persisted(step): @step('I view the High Level Source I see my changes') def high_level_source_in_editor(step): - world.css_click('a.edit-button') - world.css_find('.launch-latex-compiler').find_by_css('a').click() + open_high_level_source() assert_equal('hi', world.css_find('.source-edit-box').value) @@ -210,3 +208,8 @@ def verify_unset_display_name(): def set_weight(weight): world.get_setting_entry(PROBLEM_WEIGHT).find_by_css('.setting-input')[0].fill(weight) + + +def open_high_level_source(): + world.css_click('a.edit-button') + world.css_click('.launch-latex-compiler > a')