diff --git a/spec/integration/driver_spec.rb b/spec/integration/driver_spec.rb index ede4dcc..72963ca 100644 --- a/spec/integration/driver_spec.rb +++ b/spec/integration/driver_spec.rb @@ -781,6 +781,14 @@ def create_screenshot(file, *args) expect(@driver.network_traffic(:blocked).length).to eq(0) end + + it 'keeps track of whether network traffic is finished' 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 + end end context 'memory cache clearing' do