Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use headless Chrome instead of Capybara-Webkit #881

Merged
merged 6 commits into from
Mar 23, 2019

Conversation

brian-kephart
Copy link
Collaborator

This repo has been using capybara-webkit for testing, but that gem depends on an old version of qt. Every time I want to run tests locally I have to revert my package manager (Homebrew), edit my bash profile, and generally mess with a bunch of stuff. Then, when I want to do anything else, I have to undo it all. This has cost me hours of work.

This PR migrates the tests to Selenium with headless Chrome to avoid unnecessary dependencies on software that cannot be installed via the Gemfile. This will make it much easier for me to run tests, and should do the same for others as well, at least for Mac users who rely on Homebrew.

By default, Selenium uses Firefox, but that has some other non-gem dependencies that led me to choose Chrome instead. I also tried Apparition without success before using Chrome.

I've left the Capybara-Webkit-specific code in case we ever go back to it once it receives updates. It is wrapped in conditional statements anyway, so I didn't have to modify or comment it out except to remove the line require 'capybara/webkit'.

While I was at it, I also:

  • removed duplicate settings from the RSpec config
  • removed a workaround for a previous version of bundler from .travis.yml
  • added a build for Ruby 2.6 and Rails 6.

Unfortunately, a database issue is still preventing some jobs from passing. That's a pre-existing issue, though, and nothing to do with this PR. All the jobs that passed before this PR still pass. Running tests locally with newer Ruby/Rails fails when running the whole suite, but passes when running one directory at a time.

@brian-kephart
Copy link
Collaborator Author

Update: I removed transactional-capybara. Tests are green.

@owen2345 owen2345 merged commit 32b40d2 into owen2345:master Mar 23, 2019
@owen2345
Copy link
Owner

Thanks so much!

@brian-kephart brian-kephart deleted the use_chrome branch April 20, 2019 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants