Commit Graph

230 Commits

Author SHA1 Message Date
luisramos0
a57504ba1f Bring api_helper.image from spree_api to support spree/api/products_controller_spec 2019-07-31 09:36:48 +01:00
luisramos0
25451eed6b Bring api spec helpers from spree_api into ofn/api_helper 2019-07-31 09:36:48 +01:00
luisramos0
e746a0db7d Bring tests from spree/api/products_controller_spec and add them to existing ones on the ofn side
Adapt these tests to have a green build
2019-07-31 09:32:33 +01:00
luisramos0
20a46a791c Bring and adapt spree/api/base_controller_spec from spree_api 2019-07-31 09:32:33 +01:00
Maikel Linke
6a06e0ac3b Raise error on missing translation keys 2019-06-25 15:06:56 +10:00
Matt-Yorkley
aca1f92060 Adapt specs to new loading methods 2019-06-12 09:47:01 +01:00
Kristina Lim
ecea0600b6 Remove feature flag for Enterprise Fee Summary 2019-05-29 02:50:41 +08:00
luisramos0
86b0d71c7e Result of rubocop auto-correct and rebuilding rubocop_manual_todo 2019-05-28 12:57:29 +01:00
luisramos0
0075ffbc02 Run transpec for spec/support 2019-05-09 23:39:30 +01:00
luisramos0
40124b7421 Improve downloads_helper clear_downloads method 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
4795832db5 Add spec DownloadsHelper to support testing csv downloads with headless chrome 2019-04-02 11:39:52 +01: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
c1d14686a6 Merge branch 'master' into 2-0-stable-Mar22 2019-03-22 10:55:17 +00:00
Maikel Linke
3ef6878233 Avoid global state change by using config stub 2019-03-21 12:49:19 +11:00
luisramos0
86f9b3d663 Delete product_distributions: drop table and remove models, controllers and BO edit page 2019-03-13 11:47:50 +00:00
luisramos0
b325cea6cb Merge branch 'master' into 2-0-stable-Mar6 2019-03-06 09:19:53 +00:00
Matt-Yorkley
bbfe71fd27 Improve readability and add code comment 2019-02-25 10:27:34 +00:00
Matt-Yorkley
ea8be0ab95 Fine-tune angular helper 2019-02-23 21:45:33 +00:00
Matt-Yorkley
c4b646c583 Wait for angular to load in BOM spec 2019-02-23 16:12:37 +00:00
luisramos0
c652cfe4d5 Merge branch 'master' into 2-0-stable-Feb12 2019-02-12 16:03:33 +00:00
Pau Pérez Fabregat
a0c144fd0c Merge pull request #3415 from openfoodfoundation/feature/enterprise_fee_summary
[Enterprise Fee Summary] Merge "Enterprise Fee Summary" report to master
2019-02-12 13:58:47 +01:00
Kristina Lim
e14c60c1c1 Add RSpec matchers for flash messages 2019-02-10 22:08:18 +08:00
Kristina Lim
461b5725d1 Hide report link and resource from non-superadmins 2019-02-08 21:26:38 +00:00
Kristina Lim
519a7d2ee6 Add datetime and integer array validator matchers 2019-02-08 21:26:36 +00:00
Kristina Lim
fdede83086 Support selecting date in next months
This was causing failures when selecting tomorrow when running tests on
the last day of the month.
2019-02-07 04:39:43 +08:00
Kristina Lim
da4d6a092a Add spec helper for choosing today from datepicker 2019-01-26 02:03:56 +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
luisramos0
0460e7fc6c Merge branch 'master' into 2-0-stable-jan-17th 2019-01-17 22:51:25 +00:00
Matt-Yorkley
7487a6da3c Fix shipping method tests 2019-01-16 17:17:10 +00:00
Matt-Yorkley
21bdaf9960 Fix enterprise images spec 2019-01-16 16:24:01 +00:00
luisramos0
5fb4faac91 Make features/admin/subscriptions_spec and shopworkflow work with selenium
Also, remove a test support method, dead code
2019-01-16 16:24:01 +00:00
Maikel Linke
1407ae7778 Make TableMatcher match exactly, not part of row
Reverts dbf3a7aaaf9d458f99e14983ca9db2d4cbe4b564.

The reverted commit tried to avoid a 30 second delay by using
have_selector. While that was successful in reducing test time, it made
the matcher find rows that where not exactly the wanted row, but contained
text of the wanted row. This wasn't a problem until we experimented with
Chrome as test browser returns text on select boxes.

This commit makes the matcher precise again. We still have to deal with
the 30 second delay.
2019-01-16 16:21:30 +00:00
Rob Harrington
ef68bd1b43 Replace unnecessary perform_and_ensure* type helpers with standard actions and expectations 2019-01-16 16:21:30 +00:00
Rob Harrington
3b40ede0b8 Fix table row matchers
The matcher was silently failing on the check step (adding ~30 seconds to out specs each time it was used!), so I changed it to fail if the basic step does not succeed
2019-01-16 16:21:30 +00:00
Rob Harrington
bba8b2020c Replace use of 'trigger' in ui_component helper 2019-01-16 16:21:30 +00:00
Rob Harrington
23fa57ff6d Update multilingual_spec to work with Selenium 2019-01-16 16:21:30 +00:00
Rob Harrington
c2432fab0b Use all_options_absent method instead of poorly written no_options_present
SAVES 30 SECONDS FOR EVERY SPEC THAT IS IT USED IN!
2019-01-16 16:21:30 +00:00
Rob Harrington
189856a92a Reimplement resize helper methods to work with Selenium 2019-01-16 16:21:30 +00:00
Rob Harrington
1bad08c1c0 Update checkout_workflow and spec_helper to work with Selenium 2019-01-16 16:21:30 +00:00
Rob Harrington
118d26b2ff Add aynchronous select2 search helper
select2_search from spree times out after 1 second, so this new method just waits for a result to be returned before attempting to select it
2019-01-16 16:21:30 +00:00
Maikel Linke
4abacb3691 Remove unused spec helpers
They all seem to have been used in the past. People forgot to remove
them after removing the using spec code.
2019-01-11 18:04:24 +11:00
Maikel Linke
e89a836e72 Remove forgotten code from spec
Commit e4ebeb8a29 forgot to remove this
code.
2019-01-11 18:04:24 +11:00
Maikel Linke
cbdda54989 DRY specs with new helper 2019-01-11 18:04:24 +11:00
Pau Perez
6af8544c52 Restore perform_deliveries value in tests 2018-12-05 10:20:13 +01:00
luisramos0
3776b891ce Merge branch 'master' into 2-0-stable-dec-3rd 2018-12-03 15:30:16 +00:00
Pau Pérez Fabregat
08297863be Merge pull request #3047 from mllocs/feature/expand-all-steps-in-checkout-page
Expand all steps in the checkout page by default
2018-11-29 16:28:42 +01:00
Maxim Colls
4b588cbfb0 Removed unused toggle helpers in spec/support 2018-11-23 16:47:55 +00:00
Maikel Linke
95dbfae757 Use expect syntax 2018-11-22 15:42:56 +11:00
Maikel Linke
1e312dfa41 Update test mail setup for Spree 2
https://github.com/openfoodfoundation/openfoodnetwork/issues/2882

The email setup differs between Spree 1 and Spree 2. We already
encapsulated that setup in a single method which now needed changing.
2018-11-15 14:30:46 +11:00