Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Commit

Permalink
added a ui test that forces experiment results
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Arnold committed Jul 12, 2012
1 parent fab9681 commit fed49de
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/whiplash_sessions/index.html.haml
Expand Up @@ -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"
<div style="clear:both">
26 changes: 26 additions & 0 deletions 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

0 comments on commit fed49de

Please sign in to comment.