Capybara::Poltergeist::StatusFailError -
i'm trying use puffing-billy gem poltergeist , have problems that. capybara_helper.rb contains next code:
billy.configure |c|   c.cache = true   c.cache_request_headers = false   c.path_blacklist = []   c.persist_cache = true   c.ignore_cache_port = true   c.non_successful_cache_disabled = false   c.non_successful_error_level = :warn   c.non_whitelisted_requests_disabled = false end   my test is:
scenario 'add new address', driver: :poltergeist_billy   proxy.stub("https://maps.googleapis.com/maps/api/js?callback=window.initializegmaps&key=#{myapikeygoeshere}&libraries=places&language=en").           and_return(code: 500)   visit new_address_path    expect(page).to have_text('service unavailable') end   and receive error:
failure/error: new_address_path       capybara::poltergeist::statusfailerror:        request 'http://127.0.0.1:33173/addresses/new' failed reach server, check dns and/or server status - timed out following resources still waiting https://maps.googleapis.com/maps/api/js?callback=window.initializegmaps&key=#{myapikeygoeshere}-qk&libraries=places   if change driver selenium_billy, error be:
failure/error: example.run   net::readtimeout:     net::readtimeout   thanks!
the resource url it's hanging on doesn't match 1 you're stubbing in puffing-billy - want stub regex instead ensure requests maps stubbed.
 proxy.stub(%r{^https://maps.googleapis.com/maps}).and_return(code: 500)      
Comments
Post a Comment