JangoSteve / Rails-jQuery-Demo

Demo Rails App with jQuery UJS
73 stars 36 forks source link

fix remotipart specs for chrome #6

Open rweng opened 11 years ago

rweng commented 11 years ago

Hi, when I change the driver to chrome, two specs fail. In the spec_helper:

Capybara.register_driver :selenium_chrome do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
Capybara.javascript_driver = :selenium_chrome

results in

Failed examples:

rspec ./spec/features/comments_spec.rb:323 # comments only submits via remotipart when a file upload is present
rspec ./spec/features/comments_spec.rb:359 # comments Disables submit button while submitting with remotipart

Using OS X 10.8 and Chrome 28.

JangoSteve commented 11 years ago

Hmm, I'll try it. My initial guess is there may be some race condition in the spec itself (I had issues sometimes even with Firefox where specs would occasionally fail due to Capybara not waiting for ajax requests to finish before it went to the next line).