Filipe
d0f48687e2
Merge pull request #13777 from rioug/13481-webhook-payment
...
Payment status change webhook
2026-01-08 11:26:41 +00:00
Gaetan Craig-Riou
0b497fbb77
Fix order payment spec
2025-12-10 10:28:12 +11:00
Gaetan Craig-Riou
efcb442a80
Add spec to test notification is triggered
2025-12-10 10:28:11 +11:00
Gaetan Craig-Riou
a38023475c
Trigger payment webhook when a payment status changes
...
It used ActiveSupport::Notifications and a listener :
StatusChangedListenerService to trigger the WebhookService
2025-12-10 10:28:11 +11:00
Gaetan Craig-Riou
059e36318e
Add type to WebhookEnpoints
...
Add migration to update existing endpoint to "order_cycle_opened" type
2025-12-10 10:28:08 +11:00
David Rodríguez
c526e72539
Improve enterprise removal (failure case)
...
Make sure failure to delete due to dependent objects is handled through
activemodel errors and not by rescuing
`ActiveRecord::DeleteRestrictionError` exceptions.
Previously we would display two alert prompts, and we would weirdly
display the content of our 500 error page on top of the screen.
Now, we display a flash error message explaining the reason to fail to
remove it.
2025-11-27 19:10:15 +01:00
David Rodríguez
e217a6fca8
Make enterprise unit specs about removal consistent
...
And not dependent on implementation details.
2025-11-27 19:09:45 +01:00
Maikel
dcb48272f5
Merge pull request #13746 from rioug/security-255-code-injection
...
[Security] Fix potential code injection
2025-11-24 12:01:44 +11:00
Gaetan Craig-Riou
74d2a94181
Add input validation to prevent code injection
...
Plus spec
2025-11-23 13:46:36 +11:00
Filipe
12c0363b7e
Merge pull request #13716 from chahmedejaz/bugfix/13554-sorting-on-demand-products
...
"On hand" value influences sorting of "on demand" products/variants
2025-11-21 10:05:44 +00:00
Ahmed Ejaz
64df7cc9bc
Refactor backorderable_name tests for clarity and consistency in product sorting
2025-11-20 06:06:56 +05:00
Ahmed Ejaz
b23fec268e
fix lint issues
2025-11-20 05:08:07 +05:00
Ahmed Ejaz
7b7a7d3418
Add backorderable_name sorting and enhance combined sorting tests
2025-11-20 05:01:08 +05:00
Filipe
d9e3076a3b
Merge pull request #13654 from pacodelaluna/check-enterprise-image-logic
...
Improve enterprise images-related logic
2025-11-14 18:15:50 +00:00
Filipe
3e02a03312
Merge pull request #13650 from rioug/13539-update-variant-multi-producer
...
Fix update multi producer products
2025-11-14 16:56:16 +00:00
Gaetan Craig-Riou
460d109bd2
Update product ability
...
A user has product permission if it is a supplier of at least one of the
product's variants
2025-11-11 11:35:19 +11:00
Gaetan Craig-Riou
6596afc562
Fix flaky spec, contain_exactly doesn't care about the order
2025-11-10 13:29:30 +11:00
François Turbelin
e07ebc21b9
Use instance_double when possible in enterprise model spec
2025-11-05 16:31:20 +01:00
Gaetan Craig-Riou
bb8ecccc31
Fix variant tag rules endpoint
...
It now returns tag rules filtered on the preferred variant tags and not
the prefered customer tags
2025-11-03 15:50:12 +11:00
Gaetan Craig-Riou
aebb18da99
Per review, improve specs
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
307acdd9d1
Per review, fixing specs descriptions
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
d51e257904
Fix order cycle tag rule specs
...
It works better when you actually save the changes to the tag_list...
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
3bb9eb9765
Add endpoint to provide autocomplete tag for variant
...
It return a list of available tags and number of related rules, based on
the given enterprise and a partial match on the given tag
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
3f297a8afa
Add tag rule to filter by variant
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
af111a9625
Clean up tag rules specs
...
Remove unnecessary use mocking and use of `__send__`
2025-11-03 14:25:05 +11:00
François Turbelin
c01818f57b
Improve entreprise spec on white label logo part
2025-10-28 18:29:25 +01:00
David Rodríguez
4c6d894bc0
Bump RuboCop to 1.86.6
...
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`.
2025-10-27 11:30:33 +01:00
David Rodríguez
b28886dd38
Normalize casing
2025-10-21 17:34:40 +02:00
David Rodríguez
bd4f115185
Create account directly with the proper stripe_user_id
2025-10-21 17:34:40 +02:00
David Rodríguez
c43650034f
Remove unnecessary test specific environment variable
2025-10-21 17:34:40 +02:00
David Rodríguez
94bc787283
Remove unused let
2025-10-21 17:34:40 +02:00
David Rodríguez
58851a8e67
Move client_id let to the only spec using it
2025-10-21 17:34:39 +02:00
David Rodríguez
c3e2382600
Move let! to the only spec using it
2025-10-21 17:34:39 +02:00
Rachel Arnould
c4c266246c
Merge pull request #13507 from rioug/tag-rules-remove-angular
...
[Variant Tags] Remove angular from tag rule admin page
2025-10-15 23:16:05 +02:00
David Rodríguez
bdafc1ff02
Use supported RSpec syntax
...
This spec was using a very old syntax no longer supported by RSpec. It's
not currently influencing specs result because the spec running into
the error is currently set as "pending". However, the spec is still run
and the error is still visible.
Fixing the syntax does not fix the spec, but lets it get a bit further.
2025-10-13 16:05:59 +02:00
Filipe
ef4d3ec138
Merge pull request #13506 from chahmedejaz/task/13505-remove-stripe-redirect-monkey-patch
...
Remove Stripe redirect monkeypatch and ensure reliable checkout flow
2025-10-01 13:03:58 +01:00
Filipe
ff2e0f4d45
Merge pull request #13533 from chahmedejaz/task/13435-sort-products-by-on-hand-amount
...
Sort product list by 'on hand' amount
2025-09-29 15:07:00 +01:00
Gaetan Craig-Riou
f38aa73434
Per review, remove test class
...
It's better to use an anonymous class, and it also prevent the test
class from leaking the global namespace
2025-09-24 10:46:37 +10:00
Gaetan Craig-Riou
11006c3a60
Display default rule
2025-09-24 10:36:21 +10:00
Ahmed Ejaz
ac06126f59
replace cvv_response_message usage with redirect_auth_url
2025-09-22 11:55:43 +05:00
Ahmed Ejaz
aecb5f49c9
fix spec as per current response we get for cvv_result
2025-09-22 11:54:20 +05:00
Ahmed Ejaz
1987f0b667
Remove redundant SQL string checks in product sorting specs for clarity
2025-09-15 11:57:33 +05:00
Ahmed Ejaz
0b5efae8c4
Refactor sorting expectations in product_sort_by_stocks_spec for clarity and accuracy
2025-09-15 11:56:07 +05:00
Ahmed Ejaz
49dbe1d039
Refactor comments for clarity in product sorting concerns
2025-09-15 02:15:03 +05:00
Ahmed Ejaz
c326aa6b23
Add comprehensive specs for sorting functionality
2025-09-15 01:59:40 +05:00
Maikel Linke
94b75540e4
Replace Timecop with Rails' time helpers
...
Rails 4.1 added time helpers but we never bothered using them. But now
I'm getting rid of the Timecop dependency and use standard helpers.
Beware though that the new helpers always freeze time. When you travel
to a certain date then the clock stops ticking while Timecop maintained
the passing of time.
The freezing of time could cause problems if you are trying to enforce a
timeout. But all current specs don't seem affected.
In most cases, the freezing will make it easier to avoid flaky specs.
2025-08-22 16:57:04 +10:00
Maikel Linke
5876c52318
Test all known scopes
2025-08-11 15:15:00 +10:00
Maikel Linke
c26686b430
Add DfcPermission model to persist granted scopes
2025-08-08 14:00:38 +10:00
Gaetan Craig-Riou
7450f8a530
Fix spec, enable inventory when needed
2025-07-09 13:43:18 +10:00
Gaetan Craig-Riou
b7f969eed9
Move the inventory feature check to ScopeVariantToHub
...
Per review, the check is done on the same enterprise as the one use to
initialize ScopeVariantToHub. So it makes sense to move the actual
feature check to ScopeVariantToHub#scope
2025-07-09 13:43:12 +10:00