thoughtbot / capybara-webkit

A Capybara driver for headless WebKit to test JavaScript web apps
https://thoughtbot.com/open-source
MIT License
1.97k stars 427 forks source link

Compatability with capybara 2.8 #937

Closed thomasbalsloev closed 7 years ago

thomasbalsloev commented 8 years ago

Hi! Much appreciate all your work on this! The Capybara gem was updated to 2.8 which the current version of capybara-webkit does not support, which means capybara-webkit will be downgraded to the very old version 1.1.

Please update this gem to support the latest Capybara version.

Best regards, Thomas.

jaredbeck commented 8 years ago

The Capybara gem was updated to 2.8 ..

The latest version of capybara is now 2.9.2, as of 2016-09-29.

Are there breaking changes in 2.8 or 2.9, or is the gemspec constraint just a precaution?

s.add_runtime_dependency("capybara", ">= 2.3.0", "< 2.8.0")

@mhoran You were the last one to edit that line of the gemspec. Do you happen to know? Thanks!

mhoran commented 8 years ago

capybara-webkit is not yet compatible with Capybara 2.8, due to a change in the API. Unfortunately we're currently blocked on adding support due to broken CI, but that's being worked on.

twalpole commented 8 years ago

@mhoran the old frame API will still be used by capybara if the new one isn't implemented, so technically capybara-webKit should work fine with 2.8, 2.9, and the soon to come 2.10 which are all mainly flexibility in finders/matchers/selectors releases

mhoran commented 8 years ago

Thanks for the clarification, @twalpole. I'm still hesitant to release the version lock without CI.

On October 4, 2016 4:24:32 PM EDT, Thomas Walpole notifications@github.com wrote:

@mhoran the old frame API will still be used by capybara if the new one isn't implemented, so technically capybara-webKit should work fine with 2.8, 2.9, and the soon to come 2.10 which are all mainly flexibility in finders/matchers/selectors releases

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/thoughtbot/capybara-webkit/issues/937#issuecomment-251502185

Sent from my mobile device.

jaredbeck commented 8 years ago

I'm hesitant to release the version lock without CI.

CI is passing now, as of https://github.com/thoughtbot/capybara-webkit/commit/b22df5fe67bfae0f26d7ccf97f55ee48ab7ca8fb

Would a PR that updates the tests to run against the latest capybara-webkit help? As of today, the latest is 2.10.1.

mhoran commented 8 years ago

I just bumped the capybara dependency on the bump-capybara branch. Unfortunately there are two failures -- one to lack of implementation of the new frame API, and another due to an incompatible behavior on closed frames with the other drivers. Likely the second issue is easily fixed, but I haven't had the time to look into the new frame API.

jaredbeck commented 8 years ago

Thanks for starting a branch, Matthew.

.. there are two failures ..

For convenience, here are those two failures, copied from https://travis-ci.org/thoughtbot/capybara-webkit/jobs/172622648

1) Capybara::Session webkit #within_frame works if the frame is closed
     Failure/Error: @session.within_frame 'parentFrame' do
     Capybara::Webkit::InvalidResponseError:
       Already at parent frame.
     # ./lib/capybara/webkit/browser.rb:305:in `check'

  2) Capybara::Session webkit #within_frame should support the driver #switch_to_frame api
     Failure/Error: expect {
       expected no Exception, got #<Capybara::NotSupportedByDriverError: Capybara::Driver::Base#switch_to_frame> with backtrace:
         # /home/travis/.rvm/gems/ruby-2.1.9/gems/capybara-2.10.1/lib/capybara/driver/base.rb:56:in `switch_to_frame'

Would it be helpful if I create two separate issues? I don't know much about the frame API, and that's the only thing I could think of to help with :)

mhoran commented 8 years ago

@jaredbeck Let's just track progress in this single issue, since the first failure is really all that needs to be addressed immediately. The second failure is an implementation detail, and we can just skip it for now to get the tests green.

iwz commented 7 years ago

@mhoran 👋 Have you looked at this recently?

mhoran commented 7 years ago

Hey @iwz. I've not. It should be a simple fix, but I've not had the time to check it out.

iwz commented 7 years ago

Ok, I might take a stab on my next investment day. Thanks!

olivierlacan commented 7 years ago

I offer my sincere and least-naggy encouragements since I need to upgrade to Capybara 2.11 and would just like to mention that the latest released version of Capybara is actually 2.11 so the lock on < 2.11 in this commit is not quite up-to-date.

AFAIK there are no additional breaking changes in 2.11 compared to 2.10: https://github.com/teamcapybara/capybara/blob/master/History.md#version-2110

mhoran commented 7 years ago

capybara-webkit 1.12.0 has been released, which supports Capybara 2.8+.