There were a few changes needed:
* Plugins are now specified through `plugin:` config keyword.
* All plugin gems need to be specified explicitly in Gemfile since they
are no longer dependencies of plugins already specified explicitly.
* All plugin gems need to be updated in other to use the new APIs.
* One cop was renamed.
* New offenses safe to correct were corrected directly with `bundle exec
rubocop -a`.
* New offenses unsafe to correct were added to the TODO configuration
with `bundle exec rubocop --auto-gen-config --auto-gen-only-exclude
--exclude-limit 1400 --no-auto-gen-timestamp`.
Capybara helpers already wait for the content to show up (and we already
have a default of 10 seconds configured), so I don't think waiting more is
actually the problem in these specs.
But if we wanted to wait more, I think it's better to pass the `:wait`
option to capybara matchers, because that's a "maximum waiting value"
but we'll still proceed earlier if the content shows up.
Using the same idea, I changed the positive assertions to happen first,
because negative assertions do spend "max wait time" waiting, while
positive assertions only wait until the content shows up.
It's a lucky guess, but the idea is that pre-loading the CSS sections and its contents makes it slightly faster, for following assertions, which are the flaky offenders
The warning first displays "Saving..." before confirming changes are saved.
I'm not entirelly sure, but it seems that asserting on this first, before asserting on other page elements stabilizes the spec.
- As we are only showing the oc warning once now we need these steps where we are dismissing the oc warning after each navigation. Just keeping the first notice dismiss after login
A spec was referring to and input id:
```
"order_cycle_incoming_exchange_0_variants_#{new_product.variants.first.id}"
```
But sometimes the exchange would have the id 1 instead of 0 and the test
would fail. Instead I opted to select the field by text visible to the
user.
Capybara should be clever enought to scroll to an element. The old
method failed nine times in CI. I couldn't reproduce it locally but
let's see if this is better.
One spec failed due to this new behaviour. Converting the shared
examples to simple blocks solved this. But the specs could probably be
written better now. I didn't invest this time.
This avoids a locale setting leaking from one spec to another. It also
means that we don't have to reset the locale in individual specs.
Also:
- `cookies` is reset automatically and we don't need to do that.
- Removed some unused code (German number format and helper methods).