Filipe
9fee4f1554
Merge pull request #9203 from AgriculturaFamiliar/remove-closed-associated-adjustments-button
...
Remove closed associated adjustments button
2022-06-10 10:10:50 +01:00
Maikel Linke
4a0ed99919
Replace Paperclip on Enterprise model
...
We configured Paperclip to convert images to JPG in some cases but I
omitted that here because we don't need it. If an image is better
represented as PNG or another format then the user should be able to
choose that.
Some specs were also testing the generated URL but the Active Storage
URL doesn't contain a style name anymore and it's not helpful to test
the URL.
2022-06-01 17:16:55 +10:00
Arthur Vieira
e0241b6866
Remove test associated without 'unlock' selected
...
Leaves the other test that should be the default behaviour and renames
it accordingly.
2022-05-26 10:12:39 -03:00
Sebastian Castro
56fab26235
Reports: refactor to easily provide default_params
2022-05-12 16:54:14 +02:00
Sebastian Castro
529858946f
Report Refactor 3: Packing
...
Stop using SQL for grouping, so we can use same grouping code than for other reports
Fix query builder default grouping_fields
2022-05-12 16:54:13 +02:00
Sebastian Castro
452a3fa933
Reports Refactor 2: Merge Spree::reports into Admin::Reports
2022-05-12 16:54:13 +02:00
Sebastian Castro
213c0dd060
Packing Report: add price and reorder columns
...
Adds price column
last_name column first because it's used for ordering
2022-05-12 16:54:12 +02:00
GeorgeThoppil
8903496a1b
Optional restocking items
2022-05-06 10:55:24 -04:00
Jean-Baptiste Bellet
3e5656e638
Remove distinct to make proper ORDER BY
...
Update specs as well to test match array and test duplication by adding property2 to product1
2022-04-21 11:03:22 +02:00
Nihal Mohammed
ccc3322c12
Change deprecated file path upload path syntax in enterprises_controller_spec
2022-03-14 18:42:58 +05:30
Filipe
7590b3ecf8
Merge pull request #8756 from jibees/8075-take-into-account-the-inherits_properties-attribute
...
Product that don't inherits from "producer"/"enterprise" properties should be filtered out by user on shop page
2022-02-21 19:04:08 +00:00
Jean-Baptiste Bellet
dfe8ed26d9
Update tests and use ransack to search with the new scope: with_properties
2022-02-07 08:57:18 +01:00
Jean-Baptiste Bellet
f8002ae49a
Add some controller specs that handle the supplier_property filtering
...
with product that don't inherits properties
2022-02-07 08:57:18 +01:00
Matt-Yorkley
48a7cfa09e
Fix more deprecated keyword arguments
2022-01-24 14:11:08 +00:00
Filipe
da703b2d95
Merge pull request #8615 from jibees/8559-enable-sort-orders-by-order-full-name
...
Enable sorting orders by order full name
2022-01-11 11:27:36 +00:00
Matt-Yorkley
9afc002286
Refactor use of image files in specs
2021-12-27 17:45:06 +00:00
Matt-Yorkley
63f6567637
Use new image path when uploading files in specs
2021-12-27 17:45:06 +00:00
Matt-Yorkley
35e20fc179
Can sort orders via bill_address.lastname
...
We only need to check the orders sort
Fix ordering in api/v0/orders_controller_spec
2021-12-16 09:33:38 +01:00
Matt-Yorkley
1efaa7e726
Switch search filters from orders to line_items
2021-12-12 13:23:56 +00:00
Matt-Yorkley
439a2318fb
Move API response under top-level :data node
2021-11-04 14:55:23 +00:00
Matt-Yorkley
97b22ec65d
Update related specs
2021-11-04 14:55:23 +00:00
Matt-Yorkley
817f0942dd
Pull in reports POC work replacing Packing reports
2021-11-04 14:55:23 +00:00
Luis Azcuaga
e8fd89a6d2
Run rubocop over existing todo
2021-10-25 21:28:28 -05:00
Jean-Baptiste Bellet
115dac3ca9
Add tax_category_id for a line_item
2021-10-18 10:56:27 +02:00
Adrien Chauve
f256bb7d28
Add new failing test on sorting orders by total (api/v0/orders)
2021-10-01 18:32:59 +02:00
Nihal Mohammed
5864e2d36e
Update states controller spec
2021-07-14 13:18:01 +01:00
Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Matt-Yorkley
099ef5d358
Add more explicit tests on updating shipping fees in Api::ShipmentsController
2021-06-04 18:19:27 +01:00
Jean-Baptiste Bellet
0306732a3d
Add test for enterprise logo and promo image uploading
...
- Add a fixture image to do the upload thanks to `fixture_file_upload`
- Check the response status, the content type and the response body for both logo image and promo image
2021-05-25 15:30:29 +02:00
Luis Ramos
f7726e552a
Adapt code coming from master to the new order api with update_order!
2021-05-19 10:09:42 -07:00
Matt-Yorkley
2e248744c0
Merge pull request #7520 from Matt-Yorkley/shipment-controller
...
Shipment controller: test coverage and improvements
2021-05-13 20:26:51 +02:00
Andy Brett
17a0063b40
Merge pull request #7402 from filipefurtad0/products_spec_add_ons
...
Adds coverage for product deletion and cloning
2021-05-10 06:26:11 -07:00
Luis Ramos
a2de86c23e
Replace be_success on test_reponse with status 200
...
In rails 6 response.success? is not supported.
2021-05-06 23:51:30 +01:00
filipefurtad0
a476416dc4
Removes html tr tag; Clarifies it block
2021-05-03 17:03:34 +01:00
Matt-Yorkley
e290c128bf
Fix error in Api::ShipmentController#update with :unlock parameter
...
This is a generic issue caused by a clash between state machines trying to define (or failing to define) the #open method on adjustments as part of their state changes interface. This method is already defined in Object. For more details, see: bb42e33bf7/lib/state_machines/machine.rb (L323-L350)
2021-04-30 14:13:22 +01:00
Matt-Yorkley
95a73704a2
Add more test coverage to Api::ShipmentController#update
2021-04-30 14:09:32 +01:00
Matt-Yorkley
b843b871f6
Ensure order totals and payment/shipment states are correct when changing shipping method on a completed order.
...
This used to happen via an after_save callback in Shipment, which called `order.update!`. That has recently been removed. After changing a shipment's selected shipping rate (shipping method), we need to ensure the order's totals and states are updated. We don't need to update all of the order's adjustments though (see previous commit).
FYI Spree handled this issue like this: 24388485ed , but there are lots of things about that commit that are clearly awful, like: params handling in a model, duplication of Order::Updater logic across the codebase, the Shipment class having responsiblity for knowing which things need to be updated on the order, etc. The result is ultimately the same as what we're doing here though.
2021-04-30 12:57:01 +01:00
Matt-Yorkley
d3f41f14c7
Add test coverage for Api::ShipmentsController#update
2021-04-30 12:45:49 +01:00
Andy Brett
8ba139c6fb
Merge pull request #6825 from julesemmac/6584-map-location-confirm
...
6584 map location confirm
2021-04-29 14:04:06 -07:00
Pau Perez
679de40a41
Move specs to where they belong
2021-04-26 10:15:13 +02:00
Cillian O'Ruanaidh
c41476423b
Merge latest master into julesemmac/6584-map-location-confirm and resolve conflict in api/enterprises_controller.rb
2021-04-22 19:43:49 +01:00
Andy Brett
aca19edd3b
Merge pull request #7421 from andrewpbrett/rails-5-2-prep-2
...
Prepare for Rails 5.2
2021-04-19 11:32:21 -07:00
Andy Brett
f85ef86b1b
update spec with valid variant
2021-04-15 09:43:22 -07:00
Matt-Yorkley
fa14a80295
Adapt order payment creation in failing specs
...
In the test setups here order.payments is empty
2021-04-14 09:22:31 -07:00
Andy Brett
c3c482c0fe
fix failing spec
...
Another PR introduced a before_action to the controller, so we have to stub that out to avoid the double receiving an unexpected message
2021-04-08 08:53:35 -07:00
Andy Brett
9b3628a4dd
Merge pull request #7299 from andrewpbrett/line-item-fees
...
Update fees after changing a line item
2021-04-08 07:26:34 -07:00
Maikel Linke
cf22a864f3
Fix typo in spec description
2021-04-08 09:24:39 +10:00
Maikel Linke
f0d5bf0ab5
Disallow changes of canceled order
2021-04-08 09:24:39 +10:00
Maikel Linke
f2a2cbd3f9
Spec stock bug when changing canceled orders
...
We decided to disallow changing canceled orders in a way that would
affect stock or totals.
2021-04-08 09:24:39 +10:00
Maikel Linke
8079fb0315
Add specs for stock changes
2021-04-08 09:24:39 +10:00