From 76764b8be22c50fd894c81b9d90fbe6da369360e Mon Sep 17 00:00:00 2001 From: JonahStanley Date: Thu, 8 Aug 2013 09:30:52 -0400 Subject: [PATCH] Fixed weight test so it won't behave differently on firefox --- cms/djangoapps/contentstore/features/problem-editor.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index 0d837ac3b3..351ed370cf 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -130,11 +130,7 @@ def set_the_weight_to_abc(step, bad_weight): world.verify_setting_entry(world.get_setting_entry(PROBLEM_WEIGHT), PROBLEM_WEIGHT, "", True) world.save_component_and_reopen(step) # But no change was actually ever sent to the model, so on reopen, explicitly_set is False - # On firefox with selenium, it will register as still being a change despite the weight remaining blank - if world.is_firefox(): - world.verify_setting_entry(world.get_setting_entry(PROBLEM_WEIGHT), PROBLEM_WEIGHT, "", True) - else: - world.verify_setting_entry(world.get_setting_entry(PROBLEM_WEIGHT), PROBLEM_WEIGHT, "", False) + world.verify_setting_entry(world.get_setting_entry(PROBLEM_WEIGHT), PROBLEM_WEIGHT, "", False) @step('if I set the max attempts to "(.*)", it displays initially as "(.*)", and is persisted as "(.*)"') @@ -228,7 +224,8 @@ def set_weight(weight): index = world.get_setting_entry_index(PROBLEM_WEIGHT) world.css_fill('.wrapper-comp-setting .setting-input', weight, index=index) if world.is_firefox(): - world.trigger_event('.wrapper-comp-setting .setting-input', index=index) + world.trigger_event('.wrapper-comp-setting .setting-input', index=index, event='blur') + world.trigger_event('a.save-button', event='focus') def open_high_level_source():