Commit Graph

2325 Commits

Author SHA1 Message Date
Rachel Arnould
27be0f6fd1 Merge pull request #13912 from dacook/sourced-variant1-13887
Create linked variants
2026-03-20 10:59:46 +01:00
Maikel Linke
66d6627c89 Spec recently changed code path 2026-03-20 11:51:50 +11:00
Maikel Linke
c5d38d684b Remove repeated navigation to speed up spec 2026-03-20 11:51:50 +11:00
Maikel Linke
c2907b839a Remove ineffective sorting spec
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.
2026-03-20 11:51:50 +11:00
Maikel Linke
ee653bb825 Remove redundant spec description
Admin users are the only one who can manage users.
2026-03-20 11:51:50 +11:00
Maikel
c5aaecf76a Merge pull request #13961 from mkllnk/taler-checkout-stock-error
Taler checkout stock error
2026-03-20 11:29:58 +11:00
Maikel Linke
8f0d4d23a7 Restore Stripe spec stubs as todo list 2026-03-18 14:54:44 +11:00
Maikel Linke
d56b4b4109 Make locale spec more accurate 2026-03-18 14:49:35 +11:00
Maikel Linke
7a01409f5c Save time by avoiding page visit 2026-03-18 14:49:34 +11:00
Maikel Linke
5c634c269b Remove unused helpers from spec 2026-03-18 14:49:34 +11:00
Maikel Linke
63988fff4f Configure test locales like other envs
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.
2026-03-18 14:49:15 +11:00
David Cook
827ba1990d Ensure changes are tracked on newly added variant
I considered a few ways to do this. Cloned products are done with MutationObserver but it doesn't quite sit right with me. A dedicated controller for newly added rows would provide a good general solution. But do we want yet another controller? I'm not sure. This works and is pretty simple (although it requires a quick loop over _every_ form element.. let's see if we can avoid that.)
2026-03-18 14:03:11 +11:00
Maikel Linke
d56790b71e Remove unneeded context blocks
Best viewed ignoring whitespace.
2026-03-18 13:23:54 +11:00
Maikel Linke
c2f725b20c Remove redundant language setup
We tested earlier already that we have the needed languages available.
2026-03-18 13:21:27 +11:00
Maikel Linke
b939d41bf5 Remove useless negative spec
Any change in markup would invalidate the test.

It is unlikely to ever fail and then it would not be a big problem.
2026-03-18 13:18:15 +11:00
Maikel Linke
91c4ba03cd Remove more expensive specs 2026-03-18 13:15:35 +11:00
Maikel Linke
3f29cdab3c Combine specs and add detail 2026-03-18 13:14:57 +11:00
Maikel Linke
60a4d36408 Remove expensive without really new coverage 2026-03-18 13:08:24 +11:00
Maikel Linke
9513c07c2f Remove ineffective test
It would pass even if locales were broken.
2026-03-18 13:05:23 +11:00
Maikel Linke
4b5fd2495f Restore multilingual spec 2026-03-18 13:03:48 +11:00
Maikel Linke
5e871fc71e Expect UI change before emails
Fixing a flaky spec.
2026-03-11 15:30:39 +11:00
Maikel Linke
62af416696 Avoid useless page visit causing spec flakiness 2026-03-11 14:41:40 +11:00
Maikel Linke
bcf39acebc Remove confusing if-branch in shared examples 2026-03-11 14:41:40 +11:00
Maikel Linke
82186118a7 Remove long inactive specs
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.
2026-03-11 14:41:40 +11:00
David Cook
18fb1cfa74 Rename variant 'owner' to 'hub'
As discussed by team, and using same nomenclature as VariantOverride.
2026-03-11 11:09:13 +11:00
David Cook
e9ce2df5a9 Rename 'source variant' to linked variant (in most places)
There are two types of linked variant associations: source and target, so we need to keep the name there.
But when cloning a variant and retaining a link as source,  we will prefer the general term 'linked variant'. Hopefully this name works well.
2026-03-11 11:09:13 +11:00
David Cook
5757f086ec Set owner enterprise when creating source variant 2026-03-11 11:09:12 +11:00
David Cook
b26152cf0e Only show option when you have permission
Preload the allow list once in the controller. This controller was initially set up to avoid instance variables, and pass variables explicitly to the template. That's a good principle, but in practice we have a growing list of variables passed down the chain to multiple partials which is getting cumbersome. I think instance variables have their place after all.
2026-03-11 11:08:50 +11:00
David Cook
5fc6d25a69 Display presence of variant link in UI
It's quite ugly. But we will be iterating on this later.
2026-03-11 11:08:50 +11:00
David Cook
eba2fbcc30 Create source variants 2026-03-11 11:07:08 +11:00
David Cook
766bedb773 Label this feature as 'beta'
The permission is effectively the feature toggle. Users can choose to use it, but shouldn't expect it all to work perfectly yet.
When it's considered full featured, we just need to update the translation. Hm... I hope that's not too painful.🤞
2026-03-11 11:07:08 +11:00
David Cook
6fe2357ca0 Add enterprise permission create_sourced_variants 2026-03-11 11:07:08 +11:00
David Cook
bd01b5f113 Add 'create sourced variant' option in variant actions menu
For now, we will only be able to create sourced variant from variants that are visible to us (variants that we manage)

    In a later commit I will hide the option if you can't use it
2026-03-11 11:07:08 +11:00
David Cook
e565243ce4 Remove unnecessary before action
Each context has different setup and needs to load the page after setup.
2026-03-11 11:07:08 +11:00
David Cook
0f3b299544 Clean up spec
There's no "COPY OF" product in the spec setup, so we don't need to check that it's not there. (unless maybe we added that to the product factory, but it seems unlikely).

Also we can use helper method.
2026-03-11 11:07:08 +11:00
David Cook
1332051a6e Move specs to relevant file
These tests are about browsing products, not performing actions.

Well, ok there's one about updating, which should probably go in the update file. But hey this is better than before.
And admittedly the "Actions" file covers three different things, not just the actions menu. shrug.
2026-03-11 11:07:07 +11:00
Gaetan Craig-Riou
4810b02233 Merge pull request #13702 from marincarroll/improve-accessibility-of-admin-pagination
Improve accessibility of admin pagination
2026-03-10 22:12:57 +11:00
Gaetan Craig-Riou
5cf213f22a Fix failing spec 2026-03-10 16:07:43 +11:00
Gaetan Craig-Riou
e7a2b7ea48 Remove payment method from customer account transaction 2026-03-10 16:07:43 +11:00
Gaetan Craig-Riou
bc23423521 Remove the link between enterprise and internal payment method
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.
2026-03-10 16:07:43 +11:00
Gaetan Craig-Riou
628810eb33 Fix spec to work with the internal payment method 2026-03-10 16:07:42 +11:00
Gaetan Craig-Riou
a60afd10e4 Display credit used on the order confirmation page 2026-03-10 16:07:42 +11:00
Gaetan Craig-Riou
b42b10fcd1 Use the order outstanding balance to create payment
When a customer credit is applied to an order, the balance due is the
order outstanding balance and not the order total.
2026-03-10 16:07:42 +11:00
Gaetan Craig-Riou
f5a3093e41 Automatically use credit at checkout when available
This only cover the ideal scenario, error handling will be added later
2026-03-10 16:07:42 +11:00
Gaetan Craig-Riou
152fd15bd0 Use display_name and display_description for payment method 2026-03-10 16:07:42 +11:00
Maikel
f7f7a5738a Merge pull request #13895 from cillian/remove-angular-from-enterprise-settings-users
Remove Angular from Enterprise > Settings > Users section
2026-03-06 14:05:13 +11:00
Marin @Home
ce1e38f97b Fixes 'orders' test failure 2026-03-04 14:43:43 +11:00
Cillian O'Ruanaidh
447d80c960 Fix spec due to switch to email type field 2026-03-04 10:28:40 +11:00
Cillian O'Ruanaidh
efae11e2af Change assertion for flakey test failure 2026-03-04 10:28:39 +11:00
Cillian O'Ruanaidh
f1071575cd Remove Angular from Enterprise > Settings > Users section 2026-03-04 10:28:36 +11:00