-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove dependency on remote images in tests #859
Conversation
spec/rails_helper.rb
Outdated
@@ -32,3 +32,9 @@ module Features | |||
|
|||
ActiveRecord::Migration.maintain_test_schema! | |||
Capybara.javascript_driver = :poltergeist | |||
Capybara.register_driver :poltergeist do |app| | |||
options = { | |||
phantomjs_options: ['--load-images=no'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a comma after the last item of a multiline hash.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Hi @pustomytnyk could you please rebase it? Thanks! |
Hi @pustomytnyk! If I could get you to fix the two Hound comments, I'd be happy to merge this. |
spec/rails_helper.rb
Outdated
options = { | ||
phantomjs_options: ['--load-images=no'] | ||
} | ||
Capybara::Poltergeist::Driver.new(app, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just pass the options directly here?
spec/rails_helper.rb
Outdated
@@ -32,3 +32,6 @@ module Features | |||
|
|||
ActiveRecord::Migration.maintain_test_schema! | |||
Capybara.javascript_driver = :poltergeist | |||
Capybara.register_driver :poltergeist do |app| | |||
Capybara::Poltergeist::Driver.new(app, phantomjs_options: ["--load-images=no"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [81/80]
updated.
Hound complained about line being too long (81/80). |
Got it, thanks! Merging. |
Fixes issue with images accessibility in tests (from #819). Issue can be reproduced with limiting internet bandwidth (test still pass if I've fully disabled internet).