I have a rails project, which I'm testing with rspec/capybara/poltergeist/phantomjs. I know I can increase the general poltergeist timeout with the general settings
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, timeout: 2.minutes)
end
But is there a way to increase the timeout for a specific request?
I have a page with a button (id=submit) which kicks off a longish (90-120 seconds) running process, before returning. I'm working on optimizing the back end to shorten the request time, but in the meanwhile, I want to increase the timeout for that specific request when testing, so something along the lines of
click_button 'submit', wait: 180