Pau Perez
aa3f0ac577
Reuse #superadmin? in Delayed Job Web route
...
This moves #superadmin? to the user decorator so it can be reused
outside FeatureFlags.
2019-04-04 16:00:27 +02:00
luisramos0
87327f7aa9
Fix specs testing order cancelation email. The email template now needs a order distributor for the signoff part
2019-04-04 13:41:07 +01:00
Maikel Linke
84501b9e41
Move feature spec to controller spec
...
It reduces the runtime (3s instead of 10s).
2019-04-04 17:01:44 +11:00
Maikel Linke
7b116c0982
Remove unnecessary condition from spec
2019-04-04 16:51:18 +11:00
Maikel Linke
72458da465
Comply to code convention using I18n.t in specs
2019-04-04 16:26:52 +11:00
Pau Pérez Fabregat
c515a8f115
Merge pull request #3537 from Matt-Yorkley/pi/on_demand_error
...
Fix nil values in on_hand column
2019-04-03 11:56:06 +02:00
Pau Pérez Fabregat
b288cb00c1
Merge pull request #3654 from mkllnk/3237-spec-overrides-in-inventory-report
...
Test inventory report to use variant overrides
2019-04-03 11:55:33 +02:00
Maikel Linke
7035d57267
Better helper naming and spec cover
2019-04-03 11:13:56 +11:00
luisramos0
40124b7421
Improve downloads_helper clear_downloads method
2019-04-02 11:39:52 +01:00
luisramos0
7cc5940e19
Load DownloadsHelper only for feature specs
2019-04-02 11:39:52 +01:00
luisramos0
e10264af86
Remove xfeature from enterprise fees summmary report spec
2019-04-02 11:39:52 +01:00
luisramos0
d9304916cc
Add chrome driver config to make testing csv downloads with headless chrome possible
2019-04-02 11:39:52 +01:00
luisramos0
c36f7e003b
Adapt assertions to new csv file download logic
2019-04-02 11:39:52 +01:00
luisramos0
4f803eba7e
Add around blocks to clear downloads directory before and after every test
2019-04-02 11:39:52 +01:00
luisramos0
4795832db5
Add spec DownloadsHelper to support testing csv downloads with headless chrome
2019-04-02 11:39:52 +01:00
luisramos0
c291601d9f
Fix rubocop warnings in enterprise_fee_summary report spec
2019-04-02 11:39:52 +01:00
Maikel Linke
500cf925ad
Fix HTML validity and element finding in spec
...
The fixed partial was used twice on the same page. So the used element
id appeared twice on the page which is invalid HTML. It also confused
the spec.
Now we look at the actually displayed text to select the correct
element.
2019-04-02 16:50:44 +11:00
Luis Ramos
d48d2a748b
Merge pull request #3662 from SDBowen/add_shipping_method
...
Add shipping method name to orders detail report
2019-04-01 15:37:57 +01:00
Kristina Lim
d866fad46e
Persist variants in customer totals specs
...
This is to properly record the on hand quantity.
2019-03-31 18:32:09 +08:00
luisramos0
bc8bca074c
Switch object in the ability to access reports. This adapts to this change in Spree: 3685569db4
...
Adapt NavigationHelper to return the controller object for reports so that Reports tab works correctly.
2019-03-29 22:16:39 +00:00
luisramos0
1fc4b7fd2a
Add manual shipping adjustment
...
For some reason this adjustment is not being added to order through the callbacks as it was before. See PR #3371
2019-03-29 22:16:39 +00:00
luisramos0
d713c755e6
Uncomment report specs so we can make them work in v2
2019-03-29 22:16:38 +00:00
luisramos0
527cfc1601
Merge branch 'master' into 2-0-stable-Mar29
2019-03-29 13:48:49 +00:00
Maikel Linke
5760aed6a6
Render only eligible adjustments on the order page
...
https://github.com/openfoodfoundation/openfoodnetwork/issues/3477
The admin orders edit form was displaying adjustments even if they were
"not eligible". For example, an additional fee with amount `0` is not
eligible. They were already hidden in the adjustments view and we are
hiding them in reports.
2019-03-29 18:41:38 +11:00
Maikel Linke
fabca84001
Close adjustments so that updates are effective
...
Spree 2.0 keeps shipping fee adjustments open unless they are manually
closed. But open adjustments cannot be edited.
To preserve updates, like changing the amount of the shipping fee
we close the adjustment first.
2019-03-29 17:23:15 +11:00
Maikel
7348987567
Merge pull request #3315 from luisramos0/2-0-phase2-pi
...
[Spree Upgrade] Phase 2 - Product Import ready - all specs running and green
2019-03-29 15:16:35 +11:00
Maikel
6e31f0078a
Merge pull request #3639 from coopdevs/fix-variant-cache-refreshing-on-delete
...
Fix variant cache refreshing on delete
2019-03-29 15:12:46 +11:00
sdbowen
0f7ef2671f
Add shipping method name to orders detail report
...
Added column allows users to see the shipping method of each order.
2019-03-28 16:08:10 -06:00
Kristina Lim
f0746eb643
Use :performing_deliveries in spec
2019-03-28 02:04:13 +08:00
luisramos0
b780823970
Fix specs to adapt to the fact that for the order workflow to get to delivery, the shipping method must be linked to the order distributor otherwise it's ignored when creating the order shipment
2019-03-27 14:10:51 +00:00
Maikel Linke
ef882b8293
Wait for entered tag before submitting
...
The changed spec was failing from time to time. This change seems to
make it stable. It may be worth moving tag entering into a helper that
verifies that the tag was entered (waits for it).
2019-03-27 10:58:00 +11:00
luisramos0
ae66e864a5
Improve models/spree/order/checkout_spec: AR is here to help you :-D
2019-03-26 15:37:36 +00:00
luisramos0
428656e92e
Add distributor to shipping method in factory completed_order_with_fees so that shipping method is not discarded during order processing in package.shipping_methods
2019-03-26 15:37:36 +00:00
luisramos0
beb19cdc8a
Override default spree splitters config (was Shipping Category and Backordered) to use only Base splitter, this splitter does not split the orders into multiple shipments
...
In OFN we cannot split the orders because one order can only have one shipment
Additionally, add spec to validate that the order workflow now works with products with different shipping categories
2019-03-26 15:37:35 +00:00
Pau Pérez Fabregat
a8f81ae7a2
Merge pull request #3652 from kristinalim/fix/3410-address_proxy_orders_controller_failing_specs
...
3410 [Spree Upgrade] Address spec failures for Admin::ProxyOrdersController
2019-03-26 15:55:13 +01:00
luisramos0
5ce762a600
Uncomment product import specs so we can make them work in v2
2019-03-26 11:34:04 +00:00
Maikel Linke
9d4589632b
Test inventory report to use variant overrides
2019-03-26 16:13:50 +11:00
Kristina Lim
db6dab2e54
Address failing specs for ProxyOrdersController
2019-03-26 00:56:02 +08:00
Kristina Lim
2aad5baac5
Make code style changes for SubscriptionConfirmJob specs
2019-03-25 22:22:11 +08:00
Kristina Lim
18fe35e130
Address spec failures for SubscriptionConfirmJob
2019-03-25 21:55:38 +08:00
Kristina Lim
79d0b63069
Add Spree::Address#full_name_reverse
2019-03-25 07:46:31 +08:00
Kristina Lim
46e7090d11
Group report by variant and use variant SKU
...
This groups the Customer Totals report by variant too (among others,
including by product), and then changes the report to use the variant
SKU not the product SKU.
This adds a spec for customer totals grouping and details, which
replaces the test specific to the SKU column.
2019-03-25 07:45:32 +08:00
Maikel Linke
7bc735eea3
Cover report content with specs
2019-03-25 04:47:13 +08:00
Maikel Linke
fdd8c06823
Style reports spec
2019-03-25 04:47:13 +08:00
Maikel Linke
856603cadd
Convert specs to RSpec 3.8.0 syntax with Transpec
...
This conversion is done by Transpec 3.4.0 with the following command:
transpec spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb
* 8 conversions
from: == expected
to: eq(expected)
* 8 conversions
from: obj.should
to: expect(obj).to
* 1 conversion
from: obj.stub(:message)
to: allow(obj).to receive(:message)
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2019-03-25 04:47:13 +08:00
Maikel Linke
0a243ac9ca
Give spec vars proper names
2019-03-25 04:47:12 +08:00
Maikel Linke
6ee27cd166
Fix spec to test the right report
...
Probably a copy&paste error. The PackingReport had exactly the same
spec.
2019-03-25 04:47:12 +08:00
Maikel Linke
dac4d4ff1a
DRY report spec
2019-03-25 04:47:07 +08:00
luisramos0
01f82e5214
Move OrderSyncer spec to xdescribe until it is fixed as part of spree upgrade phase 2. This is a subscriptions specific spec
2019-03-22 13:06:45 +00:00
luisramos0
287ea6038a
Remove distributors from product in completed_order_with_fees factory. This setter is no longer available after product distributions has been deleted
2019-03-22 11:50:24 +00:00