I have a bug in my app which occurs if a user clicks the submit button of a form very quickly twice in a row. I can reliably reproduce this on production and in my development environment.
Is it possible for me to reproduce this with Capybara/poltergeist/phantomjs?
find("#my-button").double_click, find("#my-button").click.click, execute_script("$('#register-button').click().click();"), and other variations with execute_script do not work.
Everything I tried only caused my server-side code to be invoked once, even though console.log logging showed that click was indeed invoked twice. So I suspect there's something fundamentally missing from the capabilities of capybara and poltergeist simulate this behavior.
Is there a way to somehow invoke phantomJS at a lower level and achieve this?
I did try increasing the concurrency of my web server, it didn't help.
- capybara 2.14.0
- rails 5.1.0
- poltergeist 1.15.0
- phantomjs 2.1.1