Commit Graph

50 Commits

Author SHA1 Message Date
Gaetan Craig-Riou
cd7e92c6ca Fix various spec 2025-01-27 11:02:41 +11:00
wandji20
a85cfab506 Remove awesome nested set gem and dependencies [OFN-11636] 2024-08-12 18:47:16 +01:00
Feruz Oripov
9d919938f3 Group Order && OrderCycle related services and specs 2024-03-16 19:07:08 +05:00
Maikel Linke
4a423e3275 Set known default password for sample users
This enables us to easily log in as one of the sample users to test
functionality as enterprise user or customer instead of admin.
2024-03-07 16:25:35 +11:00
Neal Chambers
1456f3b7db Remove Bogus Gateway from Sample Data 2023-11-07 11:19:26 +09:00
filipefurtad0
0e699e9cee Adds attribute to enterprise factory
so that sample data rake task creates visible enterprises by default
2023-10-04 18:00:36 +01:00
Neal Chambers
4596997547 Fix Style/HashSyntax 2023-09-16 09:05:31 +09:00
Matt-Yorkley
a712eac333 Update shipping_category in /lib and /engines 2023-08-14 21:02:47 +01:00
James Wu
ee30d3d139 Fix PaymentMethodFactory creating extra Calculator 2023-04-18 09:39:39 +10:00
Maikel Linke
4eb2b5d483 Reduce method complexity 2022-04-13 14:55:54 +10:00
Maikel Linke
a3a1e27cb1 Update setup script for removed callbacks
We removed some Spree magic a while back and that broke our sample data
script. This is now corrected.

I also added a spec so that we will notice broken seed data earlier.
2022-04-13 14:48:30 +10:00
Luis Ramos
e52937c113 Use rubocop auto correct to add frozen string literal to all files
This is an unsafe auto corection, we will need to trust our build here
2021-06-17 23:07:26 +01:00
Maikel Linke
11cb8cbbdc Fix sample_data by filtering params for products
We were passing too many parameters to the product creation. Rails 5.2
complained that products don't have a distributor. Filtering the
parameters helps.
2021-05-21 12:41:55 +10:00
Viktor Smari
536281ec80 Remove distributer from sample_data
Closes #7625
2021-05-12 23:01:08 +02:00
Luis Ramos
5289a5b381 Add namespace to all sample data factories
These factories are not used in testing and this way we avoid collisions on the root namespace as it was happening already with OrderFactory
2020-11-10 22:03:36 +00:00
Luis Ramos
ccab133d63 Make sample data use OFN's calculators 2020-11-04 12:15:45 +00:00
Luis Ramos
85096a997f Add a checkbox to checkout to tick for Terms and Conditions
Checkout button should be disabled if checkbox is not ticked
2020-10-30 15:08:26 +00:00
Luis Ramos
3df5a0644f Make sample data vegetarian 2020-08-31 10:57:07 +01:00
Maikel Linke
fe0c04b650 Complete renaming of AdvanceOrderService to OrderWorkflow 2020-07-29 12:24:18 +10:00
Luis Ramos
5e8438c446 Move all calculators outside the spree namespace 2020-07-07 17:26:23 +01:00
Lucas Hiago
52da896b03 Fix name when try to search on seed 2020-06-18 21:06:04 -03:00
Luis Ramos
19da0ba969 Merge branch 'master' into 3-0-stable-may13 2020-05-13 19:50:32 +01:00
Luis Ramos
be998a9eb6 Reload shipment before shipping otherwise shipment stays as ready but with shipped_at defined 2020-05-13 12:00:37 +01:00
Luis Ramos
825f747dff Add more types of sample orders 2020-05-05 23:16:54 +01:00
Luis Ramos
4083da5b16 Add sample order to sample data 2020-05-05 23:16:54 +01:00
Luis Ramos
44872844ed Make ship methods in sample data have the name of the enterprise so it's easier to distinguish them 2020-05-03 16:36:12 +01:00
Luis Ramos
839b373b5c Merge branch 'master' into 3-0-stable-Apr28 2020-04-28 13:40:19 +01:00
Luis Ramos
2e4f8003b6 Fix group factory in rails 4
params[:address] was breaking the creation of the EnterpriseGroup
2020-03-25 15:32:16 +00:00
Matt-Yorkley
53645517af Update deprecated #find_by_* methods 2020-02-22 11:06:51 +00:00
Matt-Yorkley
30558485de Update deprecated #find_or_create_by_* methods 2020-02-22 11:06:51 +00:00
luisramos0
9404aacfb2 run rubocop --auto-correct 2019-11-10 18:42:43 +00:00
luisramos0
f396f6bebd Add tax category to sample products 2019-10-27 19:59:35 +00:00
Dan Ingenthron
560fa6b949 Update shipping category factory with default 2019-10-08 18:37:16 -05:00
luisramos0
07854cf372 Fix a few problems introduced by rubocop auto correct 2019-05-28 12:57:29 +01:00
luisramos0
e2f5515412 Fix sample data by setting on_demand in the product variant, setting product.on_demand is not possible in v2 2019-03-21 13:13:50 +00:00
luisramos0
88335c7f6c Fix sample data in v2 by adapting to the fact that shipping methods can now have multiple zones 2019-03-21 13:12:44 +00:00
luisramos0
98a262f86e Fix sample data in v2 by setting a Default shipping category in both products and shipping methods 2019-03-21 13:12:03 +00:00
Maikel Linke
42ee4b9f42 Remove usage of ProductDistribution which is dead
Sample data was failing since:
https://github.com/openfoodfoundation/openfoodnetwork/pull/3570
2019-03-21 13:11:05 +00:00
luisramos0
9644fcf67c Improve payment method factory in sample data by removing constantize 2019-03-06 10:01:17 +00:00
luisramos0
03d242c061 Fix typo in sample_data zone creation (zonEable) and added clause to avoid re-adding the same country to the zone 2019-02-27 23:19:39 +00:00
luisramos0
ad5c379771 Make sample data zone read from the environment variable CHECKOUT_ZONE 2019-02-27 09:46:18 +00:00
luisramos0
d418ca1b1f Add mandatory payment method provider to sample data payment methods 2019-02-27 09:45:21 +00:00
Maikel Linke
6790e8895d Create sample payment methods with current environment 2019-02-15 16:44:55 +11:00
Maikel Linke
cc46bfd002 Rename namespace to ofn 2019-02-05 16:30:46 +11:00
Maikel Linke
659aa269de Fix creation of sample payment methods on staging
Due to an unknown reason my chosen way of creating calculator and
assigning it to a payment method didn't work in staging environment even
though it was working in development.

Without diving deeper into the cause of this, I decided to change the
record assignments and fix the problem that way.
2019-02-05 16:24:30 +11:00
Maikel Linke
c3029c612a Fix sample product creation and use bang methods
Mistakes like the missing fee when creating product distributions were
hidden, because I didn't use the bang methods to create records.
2019-02-05 16:23:17 +11:00
Maikel Linke
1d07327325 Add descriptions to enterprises 2019-02-05 16:23:17 +11:00
Maikel Linke
4b389ba357 Move sample data factories into their own files 2019-02-05 16:23:17 +11:00
Maikel Linke
3ab02d90df Move sample data address module to own file 2019-02-05 16:23:17 +11:00
Maikel Linke
bec9f5eb2e Move sample data logger to own module 2019-02-05 16:23:17 +11:00