Permalink
Browse files

unselecting "hide student names" in speedgrader

fixes #8794

The switch to userSettings in eca5534 changed the conditionals to
check for true/false rather than string values "true"/"false", but we
were still storing the string value in the setting.

test plan: load the speedgrader settings, select "hide student names"
and save. then load the settings again, unselect the option and save.
the student names should no longer be hidden.

Change-Id: I5b67c1bab8ad0eb6237a6dfa617a5a3b7277d549
Reviewed-on: https://gerrit.instructure.com/11068
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
  • Loading branch information...
1 parent 5b03676 commit 86f5b5813e6e6b73028312bb7cd53f3a1b5d0c9a @codekitchen codekitchen committed May 27, 2012
Showing with 9 additions and 1 deletion.
  1. +1 −1 public/javascripts/speed_grader.js
  2. +8 −0 spec/selenium/speed_grader_spec.rb
@@ -382,7 +382,7 @@ define([
submitForm: function(e){
userSettings.set('eg_sort_by', $('#eg_sort_by').val());
- userSettings.set('eg_hide_student_names', $("#hide_student_names").prop('checked').toString());
+ userSettings.set('eg_hide_student_names', $("#hide_student_names").prop('checked'));
$(e.target).find(".submit_button").attr('disabled', true).text(I18n.t('buttons.saving_settings', "Saving Settings..."));
window.location.reload();
return false;
@@ -416,6 +416,14 @@ def goto_section(section_id)
driver.find_element(:css, '#settings_form .submit_button').click
}
keep_trying_until { driver.find_element(:css, '#combo_box_container .ui-selectmenu .ui-selectmenu-item-header').text == "Student 1" }
+
+ # unselect the hide option
+ driver.find_element(:css, "#settings_link").click
+ driver.find_element(:css, '#hide_student_names').click
+ expect_new_page_load {
+ driver.find_element(:css, '#settings_form .submit_button').click
+ }
+ keep_trying_until { driver.find_element(:css, '#combo_box_container .ui-selectmenu .ui-selectmenu-item-header').text.should == "student@example.com" }
end
it "should leave the full rubric open when switching submissions" do

0 comments on commit 86f5b58

Please sign in to comment.