diff --git a/app/views/whiplash_sessions/index.html.haml b/app/views/whiplash_sessions/index.html.haml index 309ebec3..e2558edb 100644 --- a/app/views/whiplash_sessions/index.html.haml +++ b/app/views/whiplash_sessions/index.html.haml @@ -15,3 +15,4 @@ = label_tag k, nil, {:style => "float:left;width:375px"} = text_field_tag k, session[k], :style => "float:left" = submit_tag "Update" +
diff --git a/spec/smoke/signing_experiments.rb b/spec/smoke/signing_experiments.rb new file mode 100644 index 00000000..a5ce3b19 --- /dev/null +++ b/spec/smoke/signing_experiments.rb @@ -0,0 +1,26 @@ +require 'smoke_spec_helper.rb' + +describe "showing the thermometer" do + before(:all) do + @petition = create_a_petition + end + it "should be visible" do + force_experiment_result("show thermometer", true) + force_experiment_result("signature display threshold", 0) + go_to petition_path(@petition) + element_exists(class: "progress_bar").should be_true + end + + it "should not be visible" do + force_experiment_result("show thermometer", false) + force_experiment_result("signature display threshold", 0) + go_to petition_path(@petition) + element_exists(class: "progress_bar").should be_false + end + + def force_experiment_result(name, value) + go_to "whiplash_sessions" + type(value).into(name: name) + click name: "commit" + end +end \ No newline at end of file