This repository has been archived by the owner on Mar 20, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a ui test that forces experiment results
- Loading branch information
Jim Arnold
committed
Jul 12, 2012
1 parent
fab9681
commit fed49de
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |