From 8e80fe635a1e8e64abd059e5b7423340cad7d0b5 Mon Sep 17 00:00:00 2001 From: Matthew Horan Date: Tue, 11 Dec 2012 21:46:17 -0500 Subject: [PATCH] Test to verify fix for #399 --- spec/integration/session_spec.rb | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/spec/integration/session_spec.rb b/spec/integration/session_spec.rb index d1c2fef..1b2f421 100644 --- a/spec/integration/session_spec.rb +++ b/spec/integration/session_spec.rb @@ -131,4 +131,55 @@ describe Capybara::Session do subject.response_headers['X-Capybara'].should == nil end end + + context "slow iframe app" do + before do + @app = Class.new(ExampleApp) do + get '/' do + <<-HTML + + + + + + Click Me! + +

+ + + HTML + end + + get '/slow' do + status 204 + sleep 1 + end + + get '/iframe' do + status 204 + end + end + end + + it "should not hang the server" do + subject.visit("/") + subject.click_link('Click Me!') + Capybara.using_wait_time(5) do + subject.should have_content("finished") + end + end + end end