Permalink
Browse files

Make tests more resilient to timing issues.

This tackles Issue #87 when running tests via X11 forwarding (or Xvfb).
  • Loading branch information...
1 parent 4394c5a commit 8a601b38ab1a4b411bbc6929d0f93d82fbbce083 @Flameeyes committed Jan 19, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 spec/integration/js_spec.rb
@@ -466,11 +466,15 @@
bip_text @user, :address, "New address"
+ sleep 1
+
id = BestInPlace::Utils.build_best_in_place_id @user, :address
page.execute_script <<-JS
$("##{id}").click();
JS
+ sleep 1
+
text = page.find("##{id} input").value
text.should == "New address"
end
@@ -547,11 +551,15 @@
bip_text @user, :money, "40"
+ sleep 1
+
id = BestInPlace::Utils.build_best_in_place_id @user, :money
page.execute_script <<-JS
$("##{id}").click();
JS
+ sleep 1
+
text = page.find("##{id} input").value
text.should == "40"
end

0 comments on commit 8a601b3

Please sign in to comment.