luisramos0
1b8445eb99
Merge branch 'master' into 2-0-stable-Feb5
2019-02-05 11:16:23 +00:00
luisramos0
698ba4618d
Adapt customer search override to spree v2 and fix customer details spec in admin orders spec
2019-02-04 18:58:02 +00:00
luisramos0
e5fdc89659
Fix distributor change spec in admin orders spec
2019-02-04 18:58:01 +00:00
luisramos0
c612df5174
Fix admin orders spec non tax adjustments by adapting to new view
2019-02-04 18:58:01 +00:00
Hugo Daniel
c823f942b4
Fix failing specs due to Spree 2's new order admin page
...
Add missing form tag and OC and shops injectors on order form to make the OC field, the distributor field and the update button work
2019-02-04 18:57:51 +00:00
Luis Ramos
5a4205d151
Merge pull request #3432 from kristinalim/fix/3327-intermittent_spec_failures
...
3327 [Flaky Spec] Fix shop accidentally becoming order coordinator
2019-02-03 19:32:40 +00:00
Luis Ramos
4b133bbc31
Merge pull request #3412 from kristinalim/fix/3059-race_condition_in_enterprise_image_specs
...
3059 [Flaky Spec] Fix race condition in enterprise image feature specs
2019-02-03 19:32:11 +00:00
Luis Ramos
a0b5509850
Merge pull request #3430 from kristinalim/fix/3420-intermittent_spec_failures
...
3420 [Flaky Spec] Fix date format in spec when single-digit day of month
2019-02-03 19:30:22 +00:00
Kristina Lim
3104862739
Fix shop accidentally becoming order coordinator
...
The original setup of the order calls:
create(:simple_order_cycle)
Which picks an arbitrary distributor as coordinator:
coordinator { Enterprise.is_distributor.first || ... }
There is a chance that any of the existing distributor enterprises
becomes coordinator, causing a test to intermittently fail.
This commit makes the relationship between the reference enterprises and
the order consistent.
2019-02-01 20:28:36 +00:00
Kristina Lim
4bff256f6d
Match date format in spec with import date filter
...
This was failing if the current day of month only has one digit. The
test could not find the date in the import date filter.
Before this commit, the resulting string in the test replaced " " with
" ", so "February 2" was being changed to "February 2". The import date
filter however uses two spaces in this case, even if the browser shows
only one (HTML inline text renders two spaces as just one).
2019-02-02 01:43:52 +08:00
Pau Pérez Fabregat
e1fb005e70
Merge pull request #3387 from kristinalim/fix/3384-product_import_timeout
...
3384 [Product Import] Process only one batch of rows at a time
2019-02-01 17:29:04 +01:00
luisramos0
e584fd2155
Make in_stock? work for both variants and overrides by moving it from VariantStock to variant_decorator.
...
Added tests for it in scope_hub_to_variant and improved VO shopping specs
2019-02-01 16:18:09 +00:00
luisramos0
5d82efa213
Add unit test for VariantStock.can_supply?
2019-02-01 16:16:04 +00:00
luisramos0
80af7c770b
Remove rescue from products_reset_strategy in product import: if setting count_on_hand fails the import will raise a RuntimeError
2019-02-01 08:32:45 +00:00
luisramos0
4b9be6f1a8
Change product import's product_reset_strategy from depending on the inexistent variant.count_on_hand DB field and instead make individual calls to variant.count_on_hand= defined in VariantStock.
...
Also, added spec to test return value of the reset method: it should return number of updated records.
2019-02-01 08:22:50 +00:00
Pau Pérez Fabregat
faea876ff0
Merge pull request #3361 from luisramos0/2-0-report-spec
...
[Spree Upgrade] Phase 2 - Fix some specs in reports_spec and in lettuce share report
2019-02-01 08:26:55 +01:00
Kristina Lim
65438e2619
Refactor checking no preview image in specs
2019-01-31 05:04:18 +08:00
Kristina Lim
a3c808a172
Refactor checking of preview image path in specs
2019-01-31 05:02:57 +08:00
Kristina Lim
777712a0e9
Fix race condition in enterprise image feature specs
2019-01-31 04:52:40 +08:00
luisramos0
f6e6f67e7d
Switch Spree::Config test setup with a mock in reports_spec to keep global test setup untouched
2019-01-30 15:03:23 +00:00
Maikel
155b205ac2
Merge pull request #3401 from luisramos0/2-0-stable-jan-29th
...
[Spree Upgrade] Merging master into 2-0-stable (4th run in Jan2019)
2019-01-30 14:44:40 +11:00
Maikel
bef7684505
Merge pull request #3399 from kristinalim/fix/3381-address_failing_tests
...
3381 [Flaky Spec] Load enterprise users tab before inspecting table
2019-01-30 14:29:16 +11:00
luisramos0
dce2524353
Added now mandatory shipping_category_id to CSVs in tests in admin/product_import_spec
2019-01-29 14:55:19 +00:00
luisramos0
fc1004cb3a
Added now mandatory shipping_category_id to CSVs in most tests in models/product_importer_spec
2019-01-29 14:55:18 +00:00
luisramos0
729feb16f1
Merge branch 'master' into 2-0-stable-jan-29th
2019-01-29 12:38:34 +00:00
Pau Perez
f4b790eefa
Restore adjustments state after updating
...
We don't know exactly if all adjustments are closed in all
circumstances, so it's better to be conservative until we figure out.
Chances are that non-completed orders have them open.
2019-01-29 09:40:54 +01:00
Pau Perez
c9429760cd
Trigger the appropriate callbacks from controller
2019-01-29 09:40:54 +01:00
Pau Perez
0b62b4621f
Make expectation easier to reason about
2019-01-29 09:40:54 +01:00
Pau Perez
9d1d8513e7
Make controller req. params a bit more obvious
2019-01-29 09:40:54 +01:00
Pau Perez
f589d4125d
Restore distributor in test that relies on it
2019-01-29 09:40:54 +01:00
Pau Perez
1bceb0748a
Do not modify config's state in test
2019-01-29 09:40:53 +01:00
luisramos0
8a86c0473d
Change app config to keep using the same v1 shipping method calculators and not the ones spree v2 introduces, these are copy pasted versions that work with packages
...
See this commit for more details: 18e5b98f5c (diff-b0846898827183f530c113ad7b83b8ea)
Also:
- remove shipping method restriction on calculators to inherit from Spree::Shipping::ShippingCalculator so that OFN customized calculators keep working
- add shipping method serializer spec to test serialization of all shipping methods configured
2019-01-27 21:03:32 +00:00
Kristina Lim
2129ab991b
Load enterprise users tab before inspecting table
2019-01-26 12:11:41 +08:00
luisramos0
bd24d3e27a
Remove setting the now inexistent global config allow_backorders to false in subs specs because the default value for on_demand (set through stocklocation.backorderabl_default) is false in all specs
2019-01-25 22:12:13 +00:00
Kristina Lim
c33808e8f5
Extract some actions in tests into methods
2019-01-26 02:03:56 +08:00
Kristina Lim
da4d6a092a
Add spec helper for choosing today from datepicker
2019-01-26 02:03:56 +08:00
Kristina Lim
b691d727a7
Move OFN::SubscriptionService to SubscriptionVariantsService
2019-01-26 02:03:55 +08:00
Kristina Lim
c23002102c
Add warning for unavailable subscription items
2019-01-26 02:03:55 +08:00
Kristina Lim
929290fc77
Reduce restrictions for creating subscriptions
...
Allow the following variants:
* Variants of permitted producers
* Variants of hub
* Variants that are in outgoing exchanges where the hub is receiver
2019-01-26 02:03:54 +08:00
Kristina Lim
57f6a7a3b9
Support clicking different text for select2 helper
...
Interaction with the variant autocomplete is not precise. The specs only
search for the product name, then click the first result that matches
the product name which they see.
This could have been the case because searching using the full variant
name does not match the variant. For example, searching "Some Product -
1kg" would not have results, while searching only "Some Product" (the
product name) would list "Some Product - 1kg".
Clicking the first match does not work in all scenarios.
This allows using a separate text for searching and for clicking.
2019-01-26 02:03:54 +08:00
Kristina Lim
d3f20289f8
Move setup of feature specs for creating subscriptions
2019-01-26 02:03:53 +08:00
Kristina Lim
35c0bcb3df
Add tests for eligible variants for a subscription
2019-01-26 02:03:53 +08:00
Kristina Lim
28c70c7719
Fix nesting of specs for editing subscriptions
2019-01-26 02:03:53 +08:00
Kristina Lim
b9492d6483
Fix setup in tests for SubscriptionValidator
2019-01-26 02:03:49 +08:00
Kristina Lim
4425b0416d
Rename import_data feature test method
2019-01-25 04:42:11 +08:00
Kristina Lim
b0efc3a2fa
Add feature spec for large file import
2019-01-25 04:42:06 +08:00
Maikel
937aaf67c3
Merge pull request #3250 from coopdevs/open-adjustments-for-update
...
[Spree Upgrade] Open adjustments to enable update
2019-01-24 10:25:16 +11:00
Kristina Lim
cf7f8b887f
Add tests for permissions for variant overrides
2019-01-24 07:08:54 +11:00
luisramos0
908c32587b
Fix xero invoices specs in reports_spec by removing the shipping adjustment as this is put in the order by the standard order callbacks when line items are added
2019-01-23 15:07:31 +00:00
Maikel
2064ffe548
Merge pull request #3354 from luisramos0/knapsack
...
New Knapsack report
2019-01-22 10:58:13 +11:00