Closed anaulin closed 5 years ago
The CI build on this PR is now green, module getting approval on the visual diff in: https://percy.io/percy/percy-capybara/builds/1504564
I blame node for messing up the nice code deletion stats in this PR.
@fotinakis i believe i've addressed all your comments on this code, please have another look
The branch I created before starting this PR, with the changes at master
for percy-capybara
version 3.2.0 are on branch: pre-agent-v320
(https://github.com/percy/percy-capybara/tree/pre-agent-v320)
Welcome to the new version
percy-capybara
, now@percy/agent
-based! 🎆Aside from the substantially smaller implementation (thanks,
@percy/agent
), the main changes in this PR are:percy-capybara
now ships with a vendorized copy ofpercy-agent.js
. This PR includes the necessarynpm
script and instructions on how to update this vendorized file.@percy/agent
package (and also in smoketests).bundle exec rake snapshots
, which will wraprspec
execution inpercy --exec
.In terms of compatibility, after upgrading to this version, users will need to:
Percy::Capybara.snapshot(page, maybe_options)
withPercy.snapshot(page, maybe_options)
.options
object remains the same, and should be fully backwards-compatible. Theinclude_iframes
option will be ignored, but iframes will work fine without it (thanks,@percy/agent
).Percy::Capybara.initialize_build
andPercy::Capybara.finalize_build
, and any otherPercy::Capybara...
calls they might have. This includes setting loaders. Loaders are no longer a thing. 😌percy exec --
In the "what is Ruby, even" category, I'm sure you'll have comments on style, and on my use of
return
(yay? nay?). I am uncertain if the file/directory structure that we have now in this package follows Ruby gem idioms. In particular,percy/capybara.rb
now contains only code for thePercy
module. Not sure if that's kosher or not.@fotinakis for review, @Robdel12 fyi