Commit Graph

104 Commits

Author SHA1 Message Date
Luis Ramos
1e5975c6e2 Fix rubocop issues 2020-06-22 17:39:20 +01:00
Luis Ramos
8a9dae0ee2 Run rubocop autocorrect
This is the result of bundle exec rubocop --auto-correct
2020-06-22 12:23:10 +01:00
David Cook
b4228e8cdd 5299 Remove unnecessary comments 2020-05-15 15:11:26 +10:00
David Cook
79df4868de 5299: Unit and feature test for filtering by multiple order cycles 2020-05-15 15:04:01 +10:00
Luis Ramos
c1b28543c6 Extract print ticket spec to a separate file 2020-04-17 20:07:45 +01:00
Luis Ramos
8bd3062b16 Fix rubocop issues 2020-04-17 18:17:54 +01:00
Luis Ramos
c7fb85a715 Replace background with members with before with let statements 2020-04-17 17:34:36 +01:00
Luis Ramos
e901615b61 Make spec simpler 2020-04-17 16:56:56 +01:00
Luis Ramos
c455dfb609 Make some specs faster by going directly to the order edit page and move incomplete order spec to a specific context 2020-04-17 16:28:27 +01:00
Luis Ramos
d96d6b2337 Split orders_spec in two: tests for orders list page and tests for orders edit page 2020-04-17 15:21:03 +01:00
Matt-Yorkley
6bed05c721 Add missing feature test for order "Ship" button 2019-12-18 14:15:48 +01:00
Matt-Yorkley
a3ee6674ea Use asynchronous requests for order capture and ship actions 2019-12-18 14:15:46 +01:00
luisramos0
9404aacfb2 run rubocop --auto-correct 2019-11-10 18:42:43 +00:00
Kristina Lim
cd81dfaead Move deleted variant to let block in feature spec 2019-08-02 21:52:36 +08:00
Kristina Lim
25073ada84 Move order to a let block in feature spec 2019-08-02 21:52:33 +08:00
Kristina Lim
15b6f9dd5e Add specs testing edit order page still okay when variant deleted
Note that the wrapping example group also loads the edit order page
before this "before" block. This will be fixed in the next commit.
2019-08-02 21:45:39 +08:00
luisramos0
f2ac354e00 Make features/admin/orders_spec test a bit more reliable by expecting element to be there before using it 2019-07-18 14:29:38 +01:00
Maikel Linke
cccd35fdf3 Remove retries from previously flaky specs
It's not acceptable to have flaky specs that only pass once in three
tries. Our specs might be more stable now that we use Chrome as test
browser. Otherwise we have to find out why these specs are not stable.
It might be an important bug that happens only sometimes.
2019-06-19 16:48:04 +10:00
luisramos0
86b0d71c7e Result of rubocop auto-correct and rebuilding rubocop_manual_todo 2019-05-28 12:57:29 +01:00
luisramos0
5791eba9bd Enhance orders edit page spec to verify that shipping method can be edited and that shipping methods of other distributors are not listed 2019-04-10 22:16:09 +01:00
Luis Ramos
4bf9320be8 Merge pull request #3666 from mkllnk/1830-v2-edit-shipping-fees
Close adjustments so that updates are effective
2019-04-10 21:58:22 +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
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
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
luisramos0
c1d14686a6 Merge branch 'master' into 2-0-stable-Mar22 2019-03-22 10:55:17 +00:00
luisramos0
3117dbf624 Remove product distributions from order model 2019-03-13 11:50:35 +00:00
luisramos0
15456577a3 Remove the button that enables user to split an order between stock locations
There's only one stock location in OFN so this feature is not useful at this point
2019-02-25 23:39:21 +00:00
luisramos0
b73ca88811 Fix edit ship method and tracking number in backoffice order page
The data-hook is necessary to make spree js code work, in this case, activate click events on edit and save buttons
2019-02-20 23:57:57 +00:00
luisramos0
fe0fb22814 Improve readability in admin/orders_spec 2019-02-07 13:45:04 +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
luisramos0
0460e7fc6c Merge branch 'master' into 2-0-stable-jan-17th 2019-01-17 22:51:25 +00:00
Rob Harrington
3a781049ed Update orders_spec to work with Selenium 2019-01-16 16:21:30 +00:00
Rob Harrington
56c07aac5c Don't run ticket printing spec 2019-01-16 16:21:30 +00:00
luisramos0
bdefc0ebd1 Fix admin orders spec by adapting the spec to the recently de-defaced page 2019-01-07 12:16:28 +00:00
Matt-Yorkley
fd47756e2f Remove workaround in failing feature spec
Removed an old workaround that clicked a button multiple times.
This was no longer working and causing the spec to fail.
2018-11-05 11:19:57 +00:00
luisramos0
a5d4c50dea Fix some specs in admin orders. Fixed path to order edit page and some html class identifiers that were changed in spree 2. Subtotal line is gone in spree 2, removed test. 2018-10-26 21:32:16 +01:00
luisramos0
87cd73ddba Merge branch 'master' into 2-0-stable-oct 2018-10-15 17:09:26 +01:00
Pau Pérez Fabregat
58a99a7f89 Merge pull request #2692 from Matt-Yorkley/bi/angular_orders
Angularise orders page
2018-10-04 21:10:48 +02:00
luisramos0
33d2b65d65 Removed deprecated spec helper have_select2_option and fixed its last usage 2018-09-20 23:01:23 +01:00
Matt-Yorkley
b2551b4e0b Rewrite existing specs 2018-09-19 13:00:30 +01:00
luisramos0
93ac99b5cc Added new factory for shipping_method_with trait delivery to fix order.shipping_method issue in features/admin/orders_spec 2018-09-17 00:44:14 +01:00
Maikel Linke
9023b16395 Speed up admin orders spec
From 80s to 74s.
2018-08-07 16:01:37 +10:00
Pierre de Lacroix
e0b12b1332 Remove dependency on model method in feature test 2018-03-20 12:18:54 +01:00
Pierre de Lacroix
03de6c690c Fix incorrect tax amount on Admin Order #show
by calling Order#tax_adjustment_totals from
Order#price_adjustment_totals
2018-03-20 12:18:09 +01:00