The previous mechanism didn't seem to work and newer Rails versions have
an easier config for this now.
Also fixing all i18n errors which were now failing specs.
The custom RSpec matchers they use raises the following deprecation
warning
```
Using `stub` from rspec-mocks' old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead. Called from /home/runner/work/openfoodnetwork/openfoodnetwork/spec/support/matchers/delegate_matchers.rb:22:in `block (2 levels) in <top (required)>'.
```
It's not worth maintaining those matchers to test such
implementation-related thing. Whether or not any delegations work is
something that will be caught by integration tests or directly stubbing
the collaborator object's methods.
This stems from
https://github.com/openfoodfoundation/openfoodnetwork/pull/6902.
- This is an option, and by default it has the previous behavior: look only for visible element
- This option allows us to look for non-visible elements
- Using new altInput from flatpickr create a input hidden element. This is why we need to look at this element.
- Using the altInput from flatpickr forces us to use this default date format
- As we now use `altInput` from flatpickr, the value used to communicate between backend and frontend is stored into an input type hidden.
When you select date at the end of the month (27,28,29,30,...) it is likely possible that this date is already displayed by the calender but for the previous month.
Avoid this by using css selector :not()
This method is named "update distribution charge". What this method actually does is delete all of the fee adjustments on an order and all it's line items, then recreate them all from scratch. We call this from lots of different places all the time, and it's incredibly expensive. It even gets called from inside of transactions being run inside callbacks. Renaming it hopefully will add a bit of clarity.
This needs to be a lot more granular!
The new mobile friendly design contains a nice "Add" button to add
variants to your cart. Once you have the variant in you cart, it's
replaced by plus and minus buttons to adjust the quantity.
Other languages have longer words than "Add" which need to fit on the
button. Since the add button and the +/- buttons should have the same
width, I widened them a little bit so that they fit the longest words
Aggiungi and Добавить.