David Cook
b7e1a660c3
Rename supplier to be more specific
...
To ensure specs are matching the right supplier.
2023-09-13 19:09:55 +02:00
David Cook
93cca56e68
Style/HashSyntax
2023-09-13 19:09:55 +02:00
filipefurtad0
019c7b3e71
Splits filtering tests between orders
...
Sets pending test case for orders with more than one supplier
2023-09-13 19:09:55 +02:00
filipefurtad0
e43661fd3c
Adds/corrects comments around Added tax section
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
44e8d2d735
fix pending lint issues
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
219c581f9a
remove pending from "should filter by producer"
2023-09-13 19:09:55 +02:00
filipefurtad0
9837a4fcf2
Removes pending (3)
...
Reverts Included Tax values
2023-09-13 19:09:55 +02:00
filipefurtad0
1b4235eb1d
Extends tests to inclusive tax scenario
2023-09-13 19:09:55 +02:00
filipefurtad0
bb0f9a6758
Adds pending test
...
on fees from order with line items from different suppliers
Adds pending test on producer filter
2023-09-13 19:09:55 +02:00
filipefurtad0
928337c3fd
Adds a second supplier and product to the setup
2023-09-13 19:09:55 +02:00
David Cook
55742f40d1
Show a line for cost of produce
...
Utilising a second group_by rule, we can add a second summary_row. The cost of produce is also inserted into the TOTALS row as per requirements.
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
ee7668e713
implement enterprise fee report filters
...
squash Reformat/Refactor spec
2023-09-13 19:09:55 +02:00
Mohamed ABDELLANI
481b09edda
test enterprise summary fee with tax report by producer
...
Reformat/Refactor spec
2023-09-13 19:09:55 +02:00
Gaetan Craig-Riou
9925399292
Sales Tax Totals by order, fix tax amount when voucher applied
...
Apply the tax discount to the tax collumn when a voucher is added
to the order, and update total excluding tax accordingly.
2023-09-12 14:36:28 +02:00
Gaetan Craig-Riou
a7bceb0b28
Add spec scenario where a voucher is added to the order
...
Voucher tax portion needs to be removed from the tax amount so we
can display the correct tax in the report.
2023-09-12 14:14:01 +02:00
Gaetan Craig-Riou
29a4bf88d7
DRY up specs
2023-09-12 14:13:04 +02:00
Jean-Baptiste Bellet
637096534f
Implement spec for #9146 issue
2023-09-12 10:20:26 +02:00
Konrad
ea622cd2d7
Merge pull request #11487 from pedrocarmona/feature/invitation-email-locale
...
Send translated email when creating users via super admin interface
2023-09-07 16:41:59 +02:00
Konrad
3b9ebf4e07
Merge pull request #11396 from abdellani/fix-if-tos-is-not-set
...
fix If ToS file is not set, customer needs to accept Terms on each checkout
2023-09-06 16:56:21 +02:00
Maikel Linke
997c8a49ca
Combine system specs for efficiency
2023-09-05 10:51:38 +10:00
Pedro Carmona
51050036d4
Use instance default locale as the default locale for a new user
2023-09-05 01:00:35 +01:00
Pedro Carmona
c4830e3baa
Send localized email when creating users via admin interface
...
Based on the current user locale
2023-09-05 01:00:35 +01:00
Konrad
fd6f2338e5
Merge pull request #11450 from mkllnk/feature-toggle-enterprise
...
Activate vouchers feature per user or enterprise
2023-09-04 21:30:41 +02:00
Jean-Baptiste Bellet
b6b64e9439
Add trix editor to new product form
2023-09-04 15:46:54 +02:00
Gaetan Craig-Riou
50693dd5d2
Merge pull request #11468 from dacook/buu-editing-part2-11059
...
[BUU] Editing - part 2 (product and variant text fields) 🚧
2023-09-04 23:41:44 +10:00
David Cook
63383e8ea1
Enable editing of variant price
...
Formatting of the price was copied from the existing bulk product screen.
2023-08-31 16:41:41 +10:00
David Cook
b955cd8fee
Enable editing of variant SKU
...
I'm not sure what the point of the product SKU was to be honest.. it will probably be removed in the product refactor.
2023-08-31 16:41:41 +10:00
David Cook
e17d16cb52
Enable editing of variant display_name
...
Best viewed with whitespace ignored.
Using Rails' nested attributes feature, which ModelSet already supports.
2023-08-31 16:41:41 +10:00
David Cook
5356e42efc
Enable editing of product SKU
2023-08-31 16:41:41 +10:00
David Cook
aff33b79ae
Simplify form code
...
The form elements shouldn't need an `id` attribute.
2023-08-31 16:41:36 +10:00
Maikel Linke
5bfbf43a38
Spec bulk enterprise fee edit without row ids
...
It makes the spec robust to different sorting of the rows. It also hides
the knowledge of the full element ids.
2023-08-31 16:03:46 +10:00
Maikel Linke
bb336ff9c4
Avoid unnecessary requests in system specs
...
This spec was nested within another block that executed a form submit
which we don't actually need here. So I flattened the structure and
repeated the few missing lines of code. This speeds up the execution.
The fee type is important in the setup because it determines the order
of the fees on the page and we access the rows by their row index.
This commit is best viewed without whitespace changes.
2023-08-31 13:44:33 +10:00
Maikel Linke
1abbfc01d2
Stabilise enterprise fee spec
...
The problem here was that the second fee was created in a `let!` block
that came after a `before` block which visited the page. In some cases
it worked but sometimes the fee wasn't created yet when the page was
loaded. Form changes in the second row were not affecting the second fee
as intended.
2023-08-31 10:02:06 +10:00
Konrad
077bb41412
Merge pull request #11348 from abdellani/fix-non-empty-orders-in-cart-state-not-appearing
...
fix Non-empty orders in the cart state do not appear in orders page
2023-08-29 15:33:49 +02:00
David Cook
451513ad04
Markup labels as.. labels
...
This means you can click on the label name to select the field, and accessibility software can read the label name. I was motivated to do this so that we could update the spec to use label text rather than IDs. But it seems we can't do that with tom-select.
I've updated the styles for all form labels (in admin_style_v3 toggle) to match the design.
2023-08-25 17:19:46 +10:00
Maikel Linke
200729f198
Show incomplete orders when sorting by name
...
An inner join with the billing address was hiding some orders when
sorting by billing address name. Telling Rails that those fields are
referenced triggers an outer left join including orders without billing
address.
But when the Bulk Order Management page sorts by `bill_address_lastname`
then Ransack does most of the magic, except that we need to override the
select in combination with distinct results.
2023-08-25 16:15:11 +10:00
David Cook
4d79cdb0ea
Ensure records are created before visiting the page
...
'let!' is executed in the same way as 'before', so it matters which order they are defined in.
For contexts with a single example, I just put it straight into the example.
2023-08-25 16:09:52 +10:00
Maikel Linke
d8da808901
Resolve pending spec, reported issue is fixed
2023-08-25 15:48:31 +10:00
David Cook
4f9651f5c9
Wait for pagination message to update
...
Hopefully this fixes openfoodfoundation/openfoodnetwork#11328
2023-08-25 14:52:50 +10:00
Maikel Linke
467d72dc31
Test voucher UI with most common feature toggle
...
People want to test vouchers mainly on a per-enterprise basis.
Replicating this in the system spec makes sure that we are testing the
conditionals in views.
2023-08-25 10:19:17 +10:00
Filipe
cc3b7c68ae
Merge pull request #11208 from dacook/buu-editing-11059
...
[BUU] Change name of my products 🚧
2023-08-24 21:19:52 +01:00
Filipe
020276a248
Merge pull request #11418 from macanudo527/fix_rubocop_7
...
Fix Rails and Style Autocorrect Rubocop Errors
2023-08-24 10:29:45 +01:00
Konrad
c90b244a96
Merge pull request #11415 from abdellani/snail-when-setting-unit-value-to-0
...
fix Snail when setting "0" in the unit value field
2023-08-24 10:04:26 +02:00
Konrad
6ec022b731
Merge pull request #11391 from rioug/11362-fix-error-creating-percentage-voucher
...
[Vouchers] fix error when creating a percentage voucher
2023-08-24 09:09:30 +02:00
Mohamed ABDELLANI
f9e6f8bfa5
fix existing tests
2023-08-23 11:50:33 +01:00
Mohamed ABDELLANI
b082475c35
update product's unit_value validation
2023-08-22 10:28:27 +01:00
Mohamed ABDELLANI
a896d414c2
optimize system test
2023-08-22 09:16:47 +01:00
Mohamed ABDELLANI
a9e4159839
validate unit_value > 0 on product model
2023-08-22 09:16:47 +01:00
David Cook
ae3cd6f7e0
Add bulk_update product form for product name
...
(For now at least,) we use one big standard Rails form, and ModelSet to update each record.
Submitting with Reflex allows us to manage the loading state along with the rest of the page (although I would rather use the built in HTTP POST standard).
Aria-label makes it a bit easier for testing (and accessibility software of course!). Technically it should have been aria-labelledby="id_of_column_header" but that would have resulted in more HTML and processing, which seemed silly.
Best viewed with whitespace ignored.
2023-08-22 11:40:58 +10:00
Neal Chambers
fd795d8513
Safely autocorrect Style/BlockComments
...
Inspecting 1483 files
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C......................................................
Offenses:
spec/system/admin/tag_rules_spec.rb:209:1: C: [Corrected] Style/BlockComments: Do not use block comments.
=begin ...
^^^^^^
spec/system/admin/tag_rules_spec.rb:217:101: C: Layout/LineLength: Line is too long. [103/100]
# expect(default_fsm_tag_rule.preferred_matched_shipping_methods_visibility).to eq "hidden"
^^^
spec/system/admin/tag_rules_spec.rb:241:1: C: [Corrected] Layout/CommentIndentation: Incorrect indentation detected (column 0 instead of 6).
# expect(foc_tag_rule.preferred_matched_order_cycles_visibility).to eq "hidden"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1483 files inspected, 3 offenses detected, 2 offenses corrected
2023-08-20 12:33:43 +09:00