-
Notifications
You must be signed in to change notification settings - Fork 74
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
🚧🥒 Reduce Capybara / Cucumber config #3911
base: master
Are you sure you want to change the base?
Conversation
features/support/capybara.rb
Outdated
end | ||
# Before '@javascript' do | ||
# Capybara.current_driver = DEFAULT_JS_DRIVER | ||
# end | ||
|
||
Before '@chrome' do |
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.
maybe
Before '@chrome' do | |
Before '@foreground' do |
|
||
# Needed because cucumber-rails requires capybara/cucumber | ||
# https://github.com/cucumber/cucumber-rails/blob/7b47bf1dda3368247bf2d45bcb17a224e80ec6fd/lib/cucumber/rails/capybara.rb#L3 | ||
# https://github.com/teamcapybara/capybara/blob/2.18.0/lib/capybara/cucumber.rb#L17-L19 | ||
Before '@javascript' do | ||
Capybara.current_driver = DEFAULT_JS_DRIVER | ||
end |
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.
I remember this @javascript
tag was heavily patched by us. I had some updates to upstream capybara/cucumber
but IIRC it required Ruby 3. So I can check about this now we have Ruby 3.1 merged.
a930d27
to
e185ba4
Compare
.circleci/config.yml
Outdated
@@ -91,7 +91,7 @@ attach-to-workspace: &attach-to-workspace | |||
at: . | |||
|
|||
system-builder-ruby31: &system-builder-ruby31 | |||
image: quay.io/3scale/system-builder:stream8-ruby3.1 | |||
image: quay.io/3scale/system-builder:stream8-ruby3.1-chrome126 |
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.
127+ didn't work with --disable-gpu
? That's worrying.
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.
Yes it does. I was trying to fix current Circleci failures by downgrading chromedriver, with no success.
3f03640
to
154f5c9
Compare
Capybara.current_driver = DEFAULT_JS_DRIVER | ||
end | ||
Capybara.javascript_driver = :headless_chrome | ||
Capybara.match = :prefer_exact # TODO: this is Capybara v1 default, we should use :one or :smart |
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 change it to :one
or :smart
directly?
options.add_argument('--host-resolver-rules=MAP * ~NOTFOUND , EXCLUDE *localhost*') | ||
options.add_argument('--disable-search-engine-choice-screen') |
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.
Not needed anymore?
The capybara configuration has grown a lot recently and I believe we're building on top of an outdated setup. Capybara/Selenium offers default features that we can use.