Skip to content

Commit

Permalink
Add a spec for Request#finished?
Browse files Browse the repository at this point in the history
  • Loading branch information
dkniffin committed Apr 20, 2020
1 parent c583c9d commit d584885
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/integration/driver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,9 @@ def create_screenshot(file, *args)
it 'keeps track of network traffic' do
@driver.clear_network_traffic
@session.visit('/apparition/with_js')
expect(@driver.network_traffic.last).not_to be_finished
sleep 1
expect(@driver.network_traffic.last).to be_finished
urls = @driver.network_traffic.map(&:url)
expect(urls.grep(%r{/apparition/jquery.min.js$}).size).to eq(1)
expect(urls.grep(%r{/apparition/jquery-ui.min.js$}).size).to eq(1)
Expand Down

0 comments on commit d584885

Please sign in to comment.