The spec was not really testing the order of users appearing on the
page. It's also a UX detail only visible to super admins which is not
important to test. So I'm not investing time to fix it.
The locale config is set in application.rb from environment variables
already. We don't need to repeat that logic in test.rb. And because it
was outdated, the language switcher was actually broken in the test
environment. We did have an English selector for the fallback `en` even
though we were already displaying English as en_TST. And after
switchting to Spanish, we could switch back because en_TST was not in
the available locales.
I now fixed the test with the right assumption and the config to solve
the problem.
Taler puts the payment completion into the hands of the user. So we
can't strictly finalise the payment and order together.
And in the bigger picture, it should be okay if a payment goes through
but we have to abort checkout due to stock issues. Then we want to be
able to check out again, using the existing complete payment. Any
refunds can be handled later by the shop owner.
Several years ago, some checkout features got rewritten and some specs
became invalid. They had been set to pending to keep the option of
rewriting them one day. Some were re-written. But I'm deleting the
remainder.
If we haven't "needed" these specs for several years then I question
their use. System specs are expensive and should only cover the most
common scenarios or the ones we know could go wrong (after a bug
report). We can always write new specs if needed. Otherwise they are
just adding to maintenance cost.
Enterprise have access to the internal payment method by default.
The access is handled at the application level so we don't have to
manage database links.
Add extra security, we don't want to void a credit payment that is not
completed, otherwise we would be refunding credit that was not used.
A credit payment should not be in a non completed state, but you never
know.