filipefurtad0
e14bc5e642
Adds comments on producer_profile_only attribute
...
Fixing typo
2023-07-17 15:06:02 +01:00
filipefurtad0
16477cad51
Adds spec for profile change (2)
...
via enterprises path
2023-07-17 15:06:02 +01:00
filipefurtad0
e0be25f927
Adds spec for profile change
...
via admin path
2023-07-17 15:06:02 +01:00
Jean-Baptiste Bellet
1cf647e04b
Avoid line-break by wrapping into nowrap element
2023-07-17 14:00:48 +02:00
Jean-Baptiste Bellet
776b9adc72
Display shipping address in summary step, instead of the billing one
...
+ update specs accordingly
2023-07-17 09:37:05 +02:00
Jean-Baptiste Bellet
f177258444
Randomize also city and zipcode for randomized address
2023-07-17 09:33:29 +02:00
Gaetan Craig-Riou
0e0850ef49
Add specs to cover re calculation
...
It is important that the calculated voucher adjustments don't change
if they are recalculated and it is equally important that they are
updated if the order has changed
2023-07-14 14:47:39 +10:00
Gaetan Craig-Riou
41271192e1
Per review, Makes quantity change more explicit
2023-07-14 14:47:39 +10:00
Gaetan Craig-Riou
751056ba39
As per review comment, spell out voucher code when entering a voucher
...
Plus, update other related spec to be consistent
2023-07-14 14:47:39 +10:00
Gaetan Craig-Riou
789ce39ff4
Fixing Rubocop errors
2023-07-14 14:47:39 +10:00
Gaetan Craig-Riou
a8062e951a
Add a scenario to make sure voucher adjustment a recalculated
...
This is specificly for voucher with a tax component, but it will
also become relevant for percentage based voucher.
2023-07-14 14:47:03 +10:00
Gaetan Craig-Riou
87790b29ae
Fix VoucherAdjustmentsService.calculate so we can call it mutiple time
...
It now uses `order.pre_discount_total` to make any calculation, that
means you can call it multiple time and you will still get the same
adjustment amount, included_tax and tax adjustment when needed. This
is assuming nothing changed on the order.
2023-07-14 14:47:03 +10:00
Gaetan Craig-Riou
60c0c54eb2
Update create_adjustment to create with an amount of 0
...
Amount calculation is handled by VoucherAdjustmentService.calculate
2023-07-14 14:47:03 +10:00
Matt-Yorkley
04bbea53e1
Move voucher processing out of checkout controller
2023-07-14 14:46:16 +10:00
Gaetan Craig-Riou
dc711bde78
Fix voucher adjustment delete
...
When using a voucher with tax not incluced in price, we need to delete
both the voucher adjustment and the tax adjustment
2023-07-14 13:37:45 +10:00
Konrad
bddc10626b
Merge pull request #11148 from cillian/fix-duplicate-rows-in-customer-addresses-report
...
Don't return duplicate rows in the customer addresses report
2023-07-13 20:32:01 +02:00
Filipe
9e0aa1854f
Merge pull request #11159 from abdellani/remove-split-checkout-from-feature_toggle
...
Remove split checkout from feature toggle
2023-07-13 17:20:18 +01:00
Filipe
308ce9263d
Merge pull request #11170 from jibees/11160-bulk-actions-function-not-working-on-safari-mac-browser
...
Admin, Orders: Make bulk actions dropdown re-enabled for Safari browser
2023-07-13 17:17:18 +01:00
Filipe
2f8a056bee
Merge pull request #11187 from jibees/10975-white-label-remember-custom-tab-activation-after-error-message
...
Admin, White Label: check the custom tab checkbox if any errors on custom tab (ie. title is blank)
2023-07-13 16:43:18 +01:00
Filipe
60c75097d3
Merge pull request #11145 from mkllnk/dfc-create-response
...
DFC API return SuppliedProduct after creation
2023-07-13 16:15:22 +01:00
Filipe
448d5ea017
Merge pull request #11135 from Matt-Yorkley/vouchers
...
Vouchers part 2
2023-07-13 12:50:32 +01:00
Jean-Baptiste Bellet
4bcba86fc8
Avoid error when testing through jest about removing event listenner
...
Avoid:
```
TypeError: Cannot read properties of null (reading 'removeEventListener')
at extended.disconnect (/home/runner/work/openfoodnetwork/openfoodnetwork/app/webpacker/controllers/dropdown_controller.js:32:14)
at Context.disconnect (/home/runner/work/openfoodnetwork/openfoodnetwork/node_modules/stimulus/dist/stimulus.umd.js:1441:25)
```
2023-07-11 10:48:52 +02:00
Jean-Baptiste Bellet
7084c53f38
Do not display menu is the dropdown is 'disabled'
...
ie. classList contains `disabled`
2023-07-11 10:48:52 +02:00
Jean-Baptiste Bellet
02aea989be
Add on_click_outside behavior on dropdown_controller
...
"It's a Surprise Tool That Will Help Us Later"
2023-07-11 10:48:52 +02:00
Jean-Baptiste Bellet
d78af187e0
Allow dropdown controller to toggle more than one class
...
"It's a Surprise Tool That Will Help Us Later"
2023-07-11 10:48:51 +02:00
Mohamed ABDELLANI
4b003aa08b
replace status:status with cancelled:boolean on invoice model
2023-07-11 09:15:25 +01:00
Jean-Baptiste Bellet
a8b9d9d8af
Check the custom tab checkbox if any errors (ie. title is blank)
2023-07-10 16:31:33 +02:00
Gaetan Craig-Riou
fb3c99e52c
Merge pull request #11121 from filipefurtad0/cart_state_orders_not_appearing_orders_page
...
Cart state orders not appearing orders page
2023-07-07 09:27:36 +10:00
Mohamed ABDELLANI
f68064480a
authorize distributor manager to generate invoices
2023-07-06 17:36:13 +01:00
Maikel Linke
15c30246a5
Allow to see only invoices of managed enterprises
2023-07-06 17:36:13 +01:00
Maikel Linke
46410b5be2
Test the right invoices controller
...
I was wondering why the spec didn't work and then I noticed that it was
testing the wrong controller and passing the wrong parameter.
2023-07-06 17:36:13 +01:00
Maikel Linke
85002d3804
Spec bug allowing any enterprise to view invoices
2023-07-06 17:36:13 +01:00
Maikel Linke
145696aa7f
Create only used test data
...
The `params` and the user are created before the request. But, for
example, the enterprise user doesn't need creating when testing
permissions of the normal user.
2023-07-06 17:36:13 +01:00
Mohamed ABDELLANI
3a9a023dea
authorize enterprise users to access invoices page
2023-07-06 17:36:13 +01:00
Matt-Yorkley
42a3087cdb
Remove :available_on attribute from Product class
2023-07-06 14:36:35 +01:00
David Cook
05a22b80bc
Merge pull request #11123 from dacook/buu-products-table
...
[admin_style_v3] Products table with variants
2023-07-06 09:37:31 +10:00
Filipe
39b597096c
Merge pull request #11137 from Matt-Yorkley/remove-product-permalink
...
Remove :permalink attribute from Product
2023-07-05 18:35:48 +01:00
Mohamed ABDELLANI
17b71b0f8d
remove split checkout context from customer spec
...
We don't need to enable split checkout, as this is default and unique mode.
2023-07-05 14:54:07 +01:00
Cillian O'Ruanaidh
a80ff6097a
Improve formatting in spec/lib/reports/customers_report_spec.rb
2023-07-04 18:27:57 +01:00
Matt-Yorkley
66a546027f
Add test coverage for handling zero priced orders
2023-07-04 13:13:05 +01:00
Gaetan Craig-Riou
74073946e6
Move VoucherAdjustmentsController to request specs
2023-07-04 13:13:05 +01:00
Matt-Yorkley
2aa3f8eb89
Fix flaky test
2023-07-04 13:13:05 +01:00
Matt-Yorkley
f7912a2240
Fix CSS/layout issues
2023-07-04 13:13:05 +01:00
Matt-Yorkley
672400192f
Update use of params
2023-07-04 13:13:05 +01:00
Matt-Yorkley
9b45b71696
Improve feature toggling
2023-07-04 13:13:05 +01:00
Matt-Yorkley
2f0f3e0820
Re-enable voucher test
2023-07-04 13:13:05 +01:00
Matt-Yorkley
a65b3b8b60
Extract voucher tests to separate controller spec
2023-07-04 13:13:05 +01:00
Matt-Yorkley
9e5061fc31
Move voucher processing out of checkout controller
2023-07-04 13:13:05 +01:00
filipefurtad0
e547e735c0
Adds test on API call for orders page
...
Removes unecessary assertion on http status
2023-07-03 11:51:46 +01:00
filipefurtad0
3f7958afe3
Adds regression test to issue #11120
2023-07-03 11:51:46 +01:00