Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/capybara/spec/test_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def initialize(string1, msg)
'Another World'
end

get '/slow_resources' do
'<img src="https://httpstat.us/504?sleep=100000" />'
end

get '/redirect' do
redirect '/redirect_again'
end
Expand Down
6 changes: 6 additions & 0 deletions spec/selenium_spec_chrome.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ module TestSessions
it 'sets the http client read timeout' do
expect(TestSessions::Chrome.driver.browser.send(:bridge).http.read_timeout).to eq 30
end

it 'does NOT block on slow resources' do
expect {
TestSessions::Chrome.visit('/slow_resources')
}.to raise_error(Net::ReadTimeout)
end
end

describe 'filling in Chrome-specific date and time fields with keystrokes' do
Expand Down
6 changes: 6 additions & 0 deletions spec/selenium_spec_firefox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ module TestSessions
it 'sets the http client read timeout' do
expect(TestSessions::SeleniumFirefox.driver.browser.send(:bridge).http.read_timeout).to eq 31
end

it 'does NOT block on slow resources' do
expect {
TestSessions::SeleniumFirefox.visit('/slow_resources')
}.to raise_error(Net::ReadTimeout)
end
end
end

Expand Down
6 changes: 6 additions & 0 deletions spec/selenium_spec_safari.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ module TestSessions
it 'sets the http client read timeout' do
expect(TestSessions::Safari.driver.browser.send(:bridge).http.read_timeout).to eq 30
end

it 'does NOT block on slow resources' do
expect {
TestSessions::Safari.visit('/slow_resources')
}.to raise_error(Net::ReadTimeout)
end
end

describe 'filling in Safari-specific date and time fields with keystrokes' do
Expand Down