[EE] Upgrade to Capybara 3
What does this MR do?
Upgrades Capybara to version 3.22.0
Capybara's new default server is puma. I set it to webrick to retain old behavior.
Breaking changes:
-
first
andall
matchers now have the waiting/retrying behavior found in the other Capybara finders and matchersI had to add to change some code to
first('div', minimum: 0)
because these now throw exceptions when no element is found.For
all
, I had to addwait: false
to some of our selectors that sometimes return no elements. This doesn't throw an exception but the tests become very slow because Capybara would try to wait untildefault_max_wait_time
. -
Whitespace is not normalized by default
I changed the global setting to normalize by default. Still, there is a slight change in behavior.
With
normalize_ws: true
, Capybara fully normalizes all whitespace to a single space. In Capybara 2, only parts of the whitespace was normalized, some\n
are returned.So I had to change some of our assertions to match the new behavior
EE-port of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27776/diffs
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team