Commit Graph

1082 Commits

Author SHA1 Message Date
Matt-Yorkley
1c85de6f58 Use producer and distributor for field names 2018-10-12 16:57:13 +01:00
Matt-Yorkley
2c9dc8899a Update fields in specs 2018-10-12 16:57:13 +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
Maikel Linke
600c8fcd4c Send confirmation emails immediately
Using deferred methods on the user model breaks delayed jobs when the
user is deleted while the job still exists. We could create a proper job
referencing a user id for sending these emails instead. But since the
user has to wait for the confirmation email anyway, we can send it
within the current request. This should be revised if performance
becomes an issue.

Sending the email directly also has the advantage that we can tell the
user if emailing failed. See the following commits.

This change impacts a bunch of specs as we now need a working email
setup to create unconfirmed users. This commit introduces a custom
matcher to unify testing for confirmation emails.
2018-09-27 13:33:08 +10:00
Maikel
51f9a0afa1 Merge pull request #2562 from Matt-Yorkley/pi/product_attributes
[Product Import] Product attributes
2018-09-25 11:36:03 +10:00
Maikel
9d48ea7b62 Merge pull request #2759 from luisramos0/del_old_spec_helper
Removed deprecated spec helper have_select2_option and fixed its last usage
2018-09-24 11:25:51 +10:00
luisramos0
33d2b65d65 Removed deprecated spec helper have_select2_option and fixed its last usage 2018-09-20 23:01:23 +01:00
luisramos0
0e6b0aa248 Deleted sample specs and one pending spec 2018-09-19 23:45:00 +01:00
Matt-Yorkley
fc68e28e4d Add :description to non-updatable attributes list 2018-09-19 22:30:10 +01:00
Matt-Yorkley
b2551b4e0b Rewrite existing specs 2018-09-19 13:00:30 +01:00
Maikel
e836ac0234 Merge pull request #2686 from HugsDaniel/2593_customize_user_guide_link
Enable setting a customized user guide link in general settings
2018-09-14 15:46:05 +10:00
Maikel
beedd933e9 Merge pull request #2512 from kristinalim/feature-remove_enterprise_images
Support removal of enterprise logo and promo image
2018-09-14 15:07:24 +10:00
Maikel Linke
81f60aab46 Make PaymentMethod serialisable with fees
https://github.com/openfoodfoundation/openfoodnetwork/issues/2655
2018-09-13 12:01:17 +10:00
Maikel Linke
d7b19750e5 Add spec for GH issue #2655 2018-09-13 12:01:16 +10:00
Hugo Daniel
cc43d789e2 Refacto edit method for content controller and enable custom user guide link 2018-09-12 14:51:53 +02:00
Maikel
3e0c74494d Merge pull request #2604 from Matt-Yorkley/pi/updating_variants_bug
Pi/updating variants bug
2018-09-07 15:10:18 +10:00
Kristina Lim
368612cad6 Allow removal of enterprise logo and promo image 2018-09-04 02:08:25 +08:00
Matt-Yorkley
9d05e5c97a Remove duplicate line in spec 2018-09-01 14:09:07 +01:00
Matt-Yorkley
04d50d4555 Fix filter results bug in validation section 2018-08-31 15:00:29 +01:00
Maikel Linke
d1f7828432 Fix pending spec
The link from the enterprise page was missing the enterprise id. So the
bulk edit page for fees was showing fees for all enterprises.
2018-08-30 14:50:41 +10:00
Maikel Linke
429bf132da Test creating a fee, not updating
The spec for creating an enterprise fee didn't actually create a new
fee. Because all enterprise fees are displayed, it changed an existing
fee.
2018-08-30 14:50:41 +10:00
Maikel Linke
297ea830dc Further style spec 2018-08-30 14:50:41 +10:00
Maikel Linke
bc1e8bfde6 Convert specs to RSpec 3.7.0 syntax with Transpec
This conversion is done by Transpec 3.3.0 with the following command:
    transpec spec/features/admin/enterprise_fees_spec.rb

* 27 conversions
    from: obj.should
      to: expect(obj).to

* 8 conversions
    from: == expected
      to: eq(expected)

* 4 conversions
    from: obj.should_not
      to: expect(obj).not_to

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2018-08-30 14:50:41 +10:00
Maikel Linke
a789aeb30a Speed up enterprise fee spec 2018-08-30 14:50:41 +10:00
Maikel
79f50e0b7b Merge pull request #2353 from luisramos0/customers_admin_country_state
fixed UX problem in the state selector in customers admin
2018-08-28 16:46:00 +10:00
Maikel
b4bea59bb0 Merge pull request #2567 from greysteil/better-feater-matchers
Switch feature matcher style from `to_not have` to `to have_no`
2018-08-28 16:44:57 +10:00
Matt-Yorkley
1df1ddcf66 Add spec for saving product and variant simultaneously 2018-08-27 23:06:54 +01:00
Kristina Lim
28792fc895 Add tests for adding/updating enterprise images 2018-08-26 03:58:19 +08:00
Grey Baker
a747561e77 Switch feature matcher style from to_not have to to have_no 2018-08-22 09:29:48 +01:00
luisramos0
61f69905f8 fixed UX problem in the state selector in customers admin 2018-08-20 20:51:22 +01:00
Kristina Lim
c14e7ea8d5 Allow bulk update of order cycle name 2018-08-16 21:18:24 +08:00
Kristina Lim
17978f58c7 Rename edit link in admin enterprise index
Change "Edit Profile" link to "Settings".
2018-08-10 12:17:31 +10:00
Kristina Lim
0b4fcf8a14 Change enterprise "Manage" button to "Settings" 2018-08-10 12:17:30 +10:00
Maikel
f93ed0de85 Merge pull request #2519 from mkllnk/more-efficient-login-in-specs
More efficient login in specs
2018-08-09 10:05:54 +10:00
Maikel
03468efa7e Merge pull request #2346 from oeoeaio/subs-totals
Subs: totals in backend are consistent and include fee breakdown
2018-08-07 18:17:13 +10:00
Maikel Linke
9aff9fbce2 Remove empty spec 2018-08-07 16:01:38 +10:00
Maikel Linke
b628ead525 Speed up shipping methods spec 2018-08-07 16:01:38 +10:00
Maikel Linke
54552f2be7 Speed up admin schedules spec 2018-08-07 16:01:37 +10:00
Maikel Linke
819a173167 Speed up reports spec 2018-08-07 16:01:37 +10:00
Maikel Linke
aa677a117b Speed up admin products spec 2018-08-07 16:01:37 +10:00
Maikel Linke
eb550505ae Speed up admin payment method spec 2018-08-07 16:01:37 +10:00
Maikel Linke
9023b16395 Speed up admin orders spec
From 80s to 74s.
2018-08-07 16:01:37 +10:00
Maikel Linke
71a381e48e Speed up order cycles spec
From 68 to 63 seconds.
2018-08-07 16:01:37 +10:00
Maikel Linke
f4cd5a7e4b Speed up admin enterprise spec
From 40s to 36s.
2018-08-07 16:01:37 +10:00
Maikel Linke
121bc51feb Speed up admin enterprises spec
From 6.5s to 5.3s.
2018-08-07 16:01:37 +10:00
Maikel Linke
f0da823445 Speed up enterprise user spec
From 1.9s to 1.7s.
2018-08-07 12:41:07 +10:00
Maikel Linke
e4ebeb8a29 Remove dead spec code
The code has been inactive since 2015 and was probably obsolete anyway.
2018-08-07 12:37:49 +10:00
Maikel Linke
0b39054954 Speed up relationships spec
From 18s to 12s: 33% speed up
2018-08-07 12:33:26 +10:00
Maikel Linke
126f312c6b Make spec more robust not relying on order
Enterprises can be in different order. Using `with_options` doesn't
care about the order.
2018-08-07 12:30:59 +10:00
Maikel Linke
edb32218b0 Use quick login to speed up product edit spec
From 48s to 44s: 8% speed up
2018-08-07 12:11:15 +10:00