Claudio Sanches
adbb4fd2d3
Merge pull request #24937 from jenkoian/wc-placeholder-attrs
...
Add support for custom attributes to wc_placeholder_img().
2019-12-04 15:42:41 -03:00
Julia Amosova
1a6adfd0db
Merge pull request #24672 from woocommerce/new/front-end-cart-e2e-test
...
Add new Puppeteer front-end e2e test: cart page
2019-12-04 17:03:10 +00:00
James Collins
7187db66e1
Add unit test
2019-12-04 12:29:40 +08:00
Julia Amosova
defbcc456e
Adjust `npm install` in travis / docker setup
2019-12-03 22:21:41 +00:00
Julia Amosova
51fcf56ecb
Increase wait time for the docker container to start
2019-12-03 21:00:46 +00:00
Claudio Sanches
0c486785ad
Merge pull request #25089 from woocommerce/fix/24009
...
Add support for '_held_for_checkout` records to prevent race conditions.
2019-12-03 17:47:22 -03:00
Julia Amosova
9e4f55a82f
More tweaks to Travis / Docker setup
2019-12-03 20:34:40 +00:00
Julia Amosova
d04d862c95
Add npm install to Travis / Docker setup
2019-12-03 19:56:03 +00:00
Claudio Sanches
df4eb9c817
Use wc_get_order() in unit tests, and fixed coding standards
2019-12-03 16:44:37 -03:00
Claudio Sanches
988b72e461
Updated filter name to woocommerce_hold_stock_for_checkout
...
Also fixed coding standards
2019-12-03 16:38:17 -03:00
Julia Amosova
37e367f379
Resolve conflicts with master branch
2019-12-03 18:49:28 +00:00
Julia Amosova
4c8c4a8dbf
Adjust Travis + Docker setup
2019-12-03 18:43:33 +00:00
Rodrigo Primo
567b667acf
Improve wc_print_notices() test coverage
2019-12-03 15:29:10 -03:00
Claudio Sanches
6a395e2485
Merge pull request #25064 from woocommerce/fix/24315
...
Optimize variable product duplication slug generation
2019-12-03 15:28:55 -03:00
Claudio Sanches
15ffaeee6b
Merge pull request #25101 from woocommerce/remove-call_user_func_array
...
Remove a few calls to func_get_args() and call_user_func_array()
2019-12-03 14:51:43 -03:00
Rodrigo Primo
86f59dff09
Merge pull request #24961 from woocommerce/fix/admin-caching-incr
...
Changed wp_cache invalidation from using increment to using microtime.
2019-12-02 15:32:17 -03:00
Julia Amosova
f4afae89c6
Add store owner login in the cart page test
2019-12-02 17:54:45 +00:00
Julia Amosova
3ffaaea6f5
Resolving conflict with migration branch
2019-12-02 17:19:58 +00:00
Julia Amosova
3eb620282e
Add store owner logout before running customer my account test
2019-12-02 16:05:22 +00:00
Julia Amosova
3d4dc64d8d
Update README with Docker setup details and running tests
2019-12-02 12:43:58 +00:00
Julia Amosova
c93c7776f1
Add additional order verification by the store owner
2019-12-02 11:21:01 +00:00
Julia Amosova
435d64919b
Add order verification by the store owner
2019-11-30 22:07:29 +00:00
Julia Amosova
6fb8f23ec6
Resolving conflict with migration branch
2019-11-28 16:46:35 +00:00
Julia Amosova
9d219dc5e0
Fix customer login on My Account page
2019-11-28 16:33:43 +00:00
Julia Amosova
d65c3c76c3
Resolve additional conflict with migration branch
2019-11-28 14:25:28 +00:00
Peter Fabian
309c48ab0e
Deprecated old cache function and replaced it with a new one.
2019-11-28 14:03:57 +01:00
Julia Amosova
3a7aeb04e6
Resolving conflict with migration branch
2019-11-28 12:47:28 +00:00
Julia Amosova
460b2f19e3
Add empty `test:e2e.json` for overriding default variables if needed
2019-11-27 23:46:47 +00:00
Julia Amosova
7b7473f917
Add `npm install` to the Travis implementation for running e2e tests
2019-11-27 00:25:11 +00:00
Julia Amosova
314c613462
Update `default.json` with default Docker test site details
2019-11-26 23:50:08 +00:00
Julia Amosova
843ceead48
Update setup-wizard test & WP Docker image version
2019-11-26 23:06:43 +00:00
vedanshujain
8c2c83d488
Use `wc_round_tax_total` to make it consistent with how we round taxes.
...
When price includes taxes, we round down. This patch uses the correct method to round taxes depending on the mode instead of plain rounding.
2019-11-27 03:13:39 +05:30
Julia Amosova
a7e582b1bb
Update docker-compose file & setup running e2e tests on Travis CI
2019-11-26 20:34:00 +00:00
vedanshujain
5ef41f1ecc
Empty cart before test to make sure everything in cart exists
2019-11-26 18:21:24 +05:30
vedanshujain
60cd7b3651
Refactor Order Class to use shared calculation logic.
...
We added a trait to move shared logic betweem Orders and Cart. This commit refactors Order class to use that shared logic.
Also adds a test for a failing case.
2019-11-25 17:53:14 +05:30
Julia Amosova
b1738068a4
Fix the way usage tracking pop-up window is handled
2019-11-24 15:40:23 +00:00
Julia Amosova
05175254ed
Update admin and customer user details in docker compose file
2019-11-24 13:49:39 +00:00
Julia Amosova
882315182b
Remove test:e2e.json file from the code base
2019-11-24 13:18:57 +00:00
Julia Amosova
2818a3c67d
Add config file to store variables needed to run e2e tests
2019-11-24 13:08:48 +00:00
Julia Amosova
5efae398fe
Finish remaining work on the setup-wizard e2e test
2019-11-24 11:38:13 +00:00
Julia Amosova
798e668895
Resolving conflict with feature branch
2019-11-23 18:11:37 +00:00
Julia Amosova
d2fa44518a
Resolving conflict with master branch
2019-11-23 18:03:04 +00:00
Julia Amosova
6dea34770f
Introduce Docker compose file & setup-wizard e2e test
2019-11-23 17:40:29 +00:00
Julia Amosova
5c57759dbc
Implement @jest/test-sequencer in order to run tests in specific order
2019-11-22 14:56:58 +00:00
Julia Amosova
59499da8ef
Update products in the checkout verification & address filling functions
2019-11-22 12:33:08 +00:00
Julia Amosova
6f0617825a
Resolving conflicts with feature branch
2019-11-21 17:21:58 +00:00
Julia Amosova
5e083cfdbf
Change the way navigation between My Account pages is done
2019-11-21 16:52:29 +00:00
Rodrigo Primo
6cd08dc7bd
Use the spread operator instead of call_user_func_array() in WC_Data_Store
...
This commit replaces a call to call_user_func_array() in WC_Data_Store::__call() with argument unpacking using the spread operator which was introduced in PHP 5.6. This change should improve WooCommerce performance a tiny bit since WC_Data_Store::__call() is called somewhat frequently and call_user_func_array() has a bad performance reputation. I added one unit test to make sure this change doesn't break the functionality of the altered method.
2019-11-21 11:52:47 -03:00
Rodrigo Primo
fa875a4d25
Fix PHPCS errors in tests/framework/class-wc-dummy-data-store.php
2019-11-21 11:52:07 -03:00
Rodrigo Primo
ed1c4b11b8
Fix PHPCS errors in WC_Tests_Data_Store class file
2019-11-21 10:41:27 -03:00
Rodrigo Primo
44b09cb15a
Remove unused test method
2019-11-21 10:40:38 -03:00
vedanshujain
70a54d0639
Added Unit Tests for `held_for_checkout` records.
2019-11-21 18:11:37 +05:30
Christopher Allford
753f39ff27
Added unique slug generation for variable product duplication
...
The standard wp_unique_post_slug() function will run one query per name collision, leading to a large number of queries being made when a product template is duplicated repeatedly. We can avoid this by doing the unique generation ourselves.
2019-11-18 13:49:41 -08:00
Maxime Jobin
61256ad208
Use the $username variable
...
This test could fail if time() does not return the same value twice.
2019-11-16 11:09:59 -05:00
Christopher Allford
4120fe1cd8
Added tests to product duplication
2019-11-15 21:12:22 -08:00
Claudio Sanches
e95dcfb68a
Added unit tests for wc_get_product_classname()
2019-11-13 15:30:03 -03:00
Claudio Sanches
d8fed95403
Convert all notice data into HTML data
2019-11-07 20:34:49 -03:00
Claudio Sanches
830e612420
Updated notice tests
2019-11-07 20:25:32 -03:00
Claudio Sanches
fdd391e10e
Introduced wc_get_pay_buttons() function
2019-11-07 17:23:38 -03:00
Claudio Sanches
ced207633c
Added unit tests for pay button support
2019-11-07 17:23:19 -03:00
Julia Amosova
ddbd688bd4
Introduce postID after creating simple and variable products
2019-11-06 22:17:44 +00:00
Julia Amosova
bef04b37f4
Resolve conflicts with feature branch
2019-11-06 17:00:48 +00:00
Julia Amosova
937ec06900
Refactor clicking on different menu tabs of My Account page
2019-11-06 16:32:11 +00:00
Ian Jenkins
2340f269cf
Add support for custom attributes to wc_placeholder_img().
...
When displaying a list of images you often want a specific class to be
attached to each image, therefore you pass through a custom class using
the attr parameter. Unfortunately this doesn't get passed through to a
placeholder image should one be needed. This means that, for example, if
you're custom class center an image or something, it won't be honoured
for placeholders, which can lead to some wonky image listings.
You can work around this currently by leverging the
`woocommerce_product_get_image` filter, but it's a bit gnarly as you
need to do some regexing or string splitting or something and checking
class names and what not. This provides a much easier way, by
supporting custom attrs on placeholder images as is the case for non
placehodler images.
2019-10-30 15:08:19 +00:00
Julia Amosova
1b54fa78c9
Merge branch 'new/puppeteer-screenshot-tester' of https://github.com/woocommerce/woocommerce into new/puppeteer-screenshot-tester
2019-10-25 18:10:49 +02:00
Julia Amosova
0c7c88b662
Fix failing new variable product test
2019-10-25 18:10:15 +02:00
Julia Amosova
88bfb1af50
Resolve conflicts with migration branch
2019-10-25 14:05:32 +02:00
Claudio Sanches
061b0f0b91
Fixed quotes style
2019-10-25 08:56:55 -03:00
Julia Amosova
bcd74e80f7
Resolve conflicts with migration branch
2019-10-25 12:09:22 +02:00
Julia Amosova
4ce07e9387
Remove `moveToTrash` variable
2019-10-25 11:40:54 +02:00
Julia Amosova
ec294e74fc
Resolve conflicts with migration branch
2019-10-25 11:25:14 +02:00
Julia Amosova
ae924fba0a
Resolve conflicts with migration branch
2019-10-25 09:34:31 +02:00
Julia Amosova
2d6b560d41
Modify verification method once customer is logged in
2019-10-20 22:46:35 +01:00
Julia Amosova
747f9f6fc3
Resolve conflicts with migration branch
2019-10-20 22:17:08 +01:00
Julia Amosova
7c95f52050
Change verification method after deleting existing tax classes
2019-10-20 21:52:53 +01:00
Julia Amosova
1850348dc3
Merge branch 'new/puppeteer-screenshot-tester' into new/wp-admin-settings-tax-e2e-test
2019-10-20 21:13:26 +01:00
Julia Amosova
3664e70547
Merge branch 'new/puppeteer-screenshot-tester' into new/wp-admin-settings-gen-product-e2e-test
2019-10-20 17:10:34 +01:00
Julia Amosova
98fc901b93
Resolve conflicts with migration branch
2019-10-20 16:57:41 +01:00
Julia Amosova
11a8cbdf79
Merge branch 'master' into new/puppeteer-screenshot-tester
2019-10-18 00:16:22 +01:00
Julia Amosova
d444dbdaf4
Add variations creation verification
2019-10-17 15:55:50 +01:00
Vedanshu Jain
cb12010627
Merge pull request #24295 from woocommerce/fix/24096
...
Remove %20 from fields in External Products form
2019-10-03 00:15:52 +05:30
Claudio Sanches
8758fbdbdc
Fixed unit tests for wc_query_string_form_fields()
2019-10-02 11:23:31 -03:00
Peter Fabian
7ea9fdec62
Added unit test for special case of attribute value 0.
2019-10-02 15:06:22 +02:00
Peter Fabian
e45fe949c1
Added unit test & updated other affected tests.
2019-10-02 14:59:42 +02:00
Julia Amosova
76ccc248aa
Add new Puppeteer front-end e2e test: checkout page
2019-09-24 15:44:10 +01:00
Julia Amosova
409775287e
Add new Puppeteer front-end e2e test: cart page
2019-09-24 12:56:02 +01:00
Julia Amosova
f970111721
Introduce store owner logout flow
2019-09-24 11:39:24 +01:00
Julia Amosova
504de0012c
Add new Puppeteer front-end e2e test: single product page
2019-09-24 10:47:47 +01:00
Julia Amosova
0e826b1bcd
Add new front-end e2e test: my account page
2019-09-20 15:28:14 +01:00
Julia Amosova
5b04c7115f
Update settings saved verification function
2019-09-04 17:34:33 +01:00
Julia Amosova
40219168c0
Add verification of settings after they've been saved
2019-09-04 17:29:13 +01:00
Julia Amosova
d43ac30ba0
Add verification of settings after they've been saved
2019-09-04 13:12:37 +01:00
vedanshujain
6f2d64dcb4
Check for max discount to be -ve to prevent overwriting fee.
...
When we refund fee and some other line item whose value is more than fee in a single requst, value of line item will overwrite refund fee.
This is because where we check to make sure that we do not discount more than total possible value (to prevent negative total), we do not account for the fact that sometimes the cart could contain refund items. In those cases max_discount * -1 will always be larges then fees total.
This commit adds a check to make sure that max discount * -1 is indeed negative before overwriting fee total.
2019-09-03 20:45:33 +05:30
Julia Amosova
6989ae76c7
Add `setCheckbox` & `unsetCheckbox` functions
2019-09-03 12:55:25 +01:00
Julia Amosova
b7201e1363
Add new Puppeteer e2e test: tax settings
2019-08-30 12:53:45 +01:00
Julia Amosova
e069afb149
Add 2 new Puppeteer e2e tests: settings general & product
2019-08-30 12:03:57 +01:00
Julia Amosova
0b8d8d0e68
Add 2 new Puppeteer e2e tests: new coupon & new order
2019-08-29 17:09:42 +01:00
Julia Amosova
560f64d212
Remove Selenium e2e tests & add Puppeteer new product e2e test
2019-08-27 13:22:24 +01:00
Julia Amosova
b3b3b15f6d
Add development mode for running e2e tests
2019-08-23 18:02:13 +01:00
Rodrigo Primo
132d785c65
Merge pull request #24242 from woocommerce/update-contributing-docs
...
Update WooCommerce developer documentation
2019-08-23 10:54:37 -03:00
Rodrigo Primo
18c83e7e4d
Remove word "simply" from documentation
...
It can have a negative implication for the reader if they don't know how to do it
2019-08-23 10:46:22 -03:00
Julia Amosova
337b134c10
Implement Puppeteer architecture & add basic test
2019-08-23 11:34:07 +01:00
Claudio Sanches
1b2b9d528a
Fixed Netherlands postcode formatting ( #24284 )
...
* Fixed Netherlands postcode formatting
Trim all spaces, fixes issues when postcode is empty.
* Always trim spaces
* Updated unit test for test_wc_format_postcode()
2019-08-09 15:00:40 -03:00
Gerhard
9c7e1d43b0
Update unit tests for wc_string_to_bool to test for camel case as well as uppercase values.
2019-08-06 14:12:42 +02:00
Gerhard
862c43c553
xvfb needs to be started in before_script
2019-08-05 14:43:54 +02:00
Claudio Sanches
162c5dd8a2
Updated tests for wc_query_string_form_fields()
2019-08-01 17:30:39 -03:00
Rodrigo Primo
833c5016ea
Add unit tests for wc_get_endpoint_url()
2019-08-01 17:23:11 -03:00
Claudio Sanches
83c0e69637
Update wc_format_decimal() tests to check for multiple decimals points
2019-07-31 19:54:58 -03:00
Rodrigo Primo
9752c1f8a0
Update tests documentation
...
Update tests documentation as PHPUnit now should be installed and called using composer instead of
globally. This commit also includes some other minor changes to the
tests documentation like updating the link of the service used for code
coverage reports.
2019-07-26 14:48:05 -03:00
Gerhard
e0371b70e8
Make config flexible to work on local and travis
2019-07-26 09:36:30 +02:00
Gerhard
a6eda46b97
npm run
2019-07-25 15:55:33 +02:00
Gerhard
e8dff32c88
Use correct variable to trigger visual regression test
2019-07-25 15:28:07 +02:00
Gerhard
af39fb7e5f
Hook up new run-vis-regression.sh script, do not run unit tests on vis regression tests
2019-07-25 13:12:24 +02:00
Gerhard
5db83f1699
First go at setting up travis to run vis regression tests.
2019-07-24 13:20:41 +02:00
Gerhard
b5aa45bf54
Add basic screenshot testing framework using jest-puppeteer and jest-image-snapshot, include basic test with a screenshot.
2019-07-23 15:08:36 +02:00
Rodrigo Primo
a8f6a94cda
Remove methods assertIsWPError() and assertNotWPError() from WC_Unit_Test_Case
...
Those two methods are already declared in the class WP_UnitTestCase, so there is
no need to declare them again in the class WC_Unit_Test_Case. The only
caveat is that assertIsWPError() is called assertWPError() in
WP_UnitTestCase so it was necessary to update all of its usages.
2019-07-19 10:56:58 -03:00
Rodrigo Primo
16442956e8
Fix PHPCS errors
2019-07-19 10:19:23 -03:00
Claudio Sanches
5eb11ea77a
Remove exception for PHP 5.2
2019-07-18 23:02:30 -03:00
Claudio Sanches
80f1e2fba2
Remove all support for PHP 5.2 in Travis
2019-07-18 23:01:14 -03:00
Claudio Sanches
16041d9247
Fixed failing tests
2019-07-18 22:42:31 -03:00
Claudio Sanches
96c7255fc0
Fixed SpeedTrapListener include
2019-07-18 22:24:40 -03:00
Claudio Sanches
67212d1303
Updated PHPUnit to 7.5.14
2019-07-18 22:02:58 -03:00
Peter Fabian
cb9d94ed9b
Merge pull request #24147 from woocommerce/revert-23705-fix/23696
...
Revert "Prevent negative prices on products"
2019-07-15 11:28:25 +02:00
Gerhard Potgieter
238a5576d0
Merge pull request #24139 from woocommerce/fix/failing-e2e-timeouts
...
Be sure to run grunt in travis
2019-07-15 09:07:36 +02:00
Gerhard Potgieter
52f1eb4060
Revert "Prevent negative prices on products"
2019-07-15 08:50:11 +02:00
Gerhard
e5ae8f10ae
Update e2e test for variations to accomodate new missing price message on variations.
2019-07-14 17:47:30 +02:00
Gerhard
0e50e2319c
Cleaning up
2019-07-14 17:16:31 +02:00
Gerhard
712969981c
Remove extra folder
2019-07-14 17:04:59 +02:00
Gerhard
689d66dae3
npm install, debugging info
2019-07-14 17:01:38 +02:00
Gerhard
d3cc901612
Params needs to be first
2019-07-14 16:56:07 +02:00
Gerhard
abee4e68c2
Use TRAVIS_BUILD_DIR constant
2019-07-14 16:17:57 +02:00
Gerhard
a04f182edb
Do not install branch from zip, rather used checked out copy instead.
2019-07-14 16:12:16 +02:00
Gerhard
ba1b684f33
Plugin folder auto renamed to woocommerce
2019-07-14 15:57:11 +02:00
Claudio Sanches
77191a97f8
Merge pull request #23705 from woocommerce/fix/23696
...
Prevent negative prices on products
2019-07-12 12:56:34 -03:00
Claudio Sanches
60c18ce544
Merge pull request #23067 from woocommerce/pr/23043
...
Allow matching of "any" attributes in find_matching_product_variation…
2019-07-12 12:40:53 -03:00
Gerhard
ebe9648fed
Branch is manually installed, must go to branch directory and compile from there.
2019-07-12 17:06:45 +02:00
Gerhard
bd06f94d01
Introduce grunt e2e-build task and exclude jshint from that.
2019-07-12 16:28:31 +02:00
Gerhard
7ab046bee4
Move grunt call to run-e2e-ci.sh
2019-07-12 16:14:11 +02:00
Gerhard
b1514ca9a0
Run grunt in travis before_script
2019-07-12 16:09:55 +02:00
Gerhard
aad5b2863a
Add more tests to test more expected combinations as well as test the negatives.
2019-07-12 15:10:20 +02:00
Claudio Sanches
c63cd802aa
Merge pull request #23957 from woocommerce/feature/feature-plugin-packages
...
Include external feature plugins as packages
2019-07-10 15:47:48 -03:00
Gerhard Potgieter
49adf8169b
Merge pull request #23672 from woocommerce/fix/23366-2
...
Auto generate usernames when a username is blacklisted by WP
2019-07-10 15:44:44 +02:00
Mike Jolley
c928188831
Update from master
2019-07-10 12:57:02 +01:00
Gerhard
98c24b1090
Merge branch 'master' into pr/23043
2019-07-10 10:34:52 +02:00
Gerhard
5122641be0
Add wc update cli call to the e2e test install. This should fix outdated/missing tables and routines.
2019-07-10 09:20:37 +02:00
Gerhard
22bb52f9be
Fix failing unit tests due to changes in #24111
2019-07-10 08:48:33 +02:00
Claudio Sanches
6e6ca196f9
Merge branch 'master' into fix/23340
2019-07-09 16:32:43 -03:00
Rodrigo Primo
34e5018137
Merge pull request #23262 from woocommerce/fix/23257
...
CSV Import - check if sku or id column exists when updating products from csv
2019-07-09 14:25:03 -03:00
Claudio Sanches
2fa5396cfc
Fixed coding standards
2019-07-09 12:43:03 -03:00
Claudio Sanches
32996d2fdd
Merge branch 'master' into pr/23043
2019-07-09 12:39:40 -03:00