Commit Graph

3545 Commits

Author SHA1 Message Date
vedanshujain 6c2f30132d Add clear cart call to prevent side effects from tests. 2021-05-07 14:30:45 +05:30
vedanshujain 49ed94a1d0 Add expected deprecate calls to make tests work with parent::setUp. 2021-05-07 14:30:44 +05:30
vedanshujain f5056d37e4 Add expected deprecated call so that we can call setUp for this testcase. 2021-05-07 14:30:44 +05:30
vedanshujain 162588c42d Add test for when product prices has more precision than is displayed. 2021-05-07 14:30:44 +05:30
vedanshujain c834dfb98b Add test for when entered price has more precision than displayed price. 2021-05-07 14:30:44 +05:30
vedanshujain 2930057847 Add tests to make sure discounts are rounded properly in cart. 2021-05-07 14:30:44 +05:30
vedanshujain a0fbff3879 Modify unit test to accomodate pre-rounding total. 2021-05-07 14:30:44 +05:30
Nestor Soriano 9dcdfddc15
Fix table creation detection in DataRegeneratorTest 2021-05-05 11:50:43 +02:00
Nestor Soriano f53f959d03
Fix the usage of FakeQueue in DataRegeneratorTest.
Also update the doc comment of FakeQueue itself on how to use it.
2021-05-05 11:11:36 +02:00
Veljko ce1e2f260d Rename the test file 2021-05-05 09:29:38 +02:00
Ron Rennick f51dfdfd56 Merge branch 'trunk' into e2e/e2e-merchant-initiate-wccom 2021-05-04 22:28:09 -03:00
Nestor Soriano c4e7074c70
Add unit tests for the DataRegenerator class 2021-05-04 16:15:16 +02:00
Nestor Soriano 4d13b0ca07
ExtendedContainer::replace now allows registering anonymous classes. 2021-05-04 16:14:34 +02:00
Greg c354a67292 Finish work on order; removed unused variable from test 2021-05-03 20:21:00 -06:00
Greg e9febd57ec Merge branch 'trunk' of github.com:woocommerce/woocommerce into fix/27873 2021-05-03 13:58:55 -06:00
roykho 2e3156d436
Use proper skip test method instead of return 2021-05-03 06:33:09 -07:00
Nestor Soriano 42245ed92a
Add unit tests for LookupDataStore::update_data_for_product (variable products) 2021-05-03 11:14:33 +02:00
Greg b9bd336b0f Merge branch 'trunk' of github.com:woocommerce/woocommerce into fix/27873 2021-05-02 15:24:22 -06:00
Ron Rennick 7b23b8c8aa two more minor E2E fixes
- add shipping zone for first checkout test
- increase wait time for product import to complete
2021-04-30 16:26:51 -03:00
Ron Rennick 946f8ec903 Merge branch 'trunk' into try/individual-test-files 2021-04-30 15:13:56 -03:00
Ron Rennick 2c72bf8a9f
Merge pull request #29734 from woocommerce/e2e/e2e-merchant-add-simple-product
Add new e2e scenario and update the existing - Merchant - Add Simple Product
2021-04-30 10:01:27 -03:00
Ron Rennick 43859058ec run cart/checkout setup tests first 2021-04-30 09:04:48 -03:00
Nestor Soriano 467af94b1d
Add unit tests for LookupDataStore::update_data_for_product (simple products)
Also:

- Add the FakeQueue class
- Fix LookupDataStore, it was using a hardcoded "wp_" lookup table name
2021-04-30 12:10:25 +02:00
Greg b61fe9859f Merge branch 'trunk' of github.com:woocommerce/woocommerce into fix/27873 2021-04-29 16:13:13 -06:00
Ron Rennick 98f7a8562d Merge branch 'trunk' into try/individual-test-files 2021-04-29 16:29:35 -03:00
Ron Rennick 4b99a24af2
Merge pull request #29728 from woocommerce/e2e/e2e-update-checkout-naming
Update test naming for the Cart tests to include adding product from shop page
2021-04-29 15:49:18 -03:00
Ron Rennick 4a78541cf5 merge trunk 2021-04-29 15:23:26 -03:00
Ron Rennick 5d4597c31c Merge branch 'trunk' into e2e/e2e-merchant-add-simple-product 2021-04-29 15:18:14 -03:00
Greg 3aca2b9248
Merge pull request #29776 from woocommerce/e2e/coupon-test-names
give cart and checkout coupon tests unique titles
2021-04-29 12:03:16 -06:00
Greg 69bab1a40c
Merge pull request #29774 from woocommerce/e2e/no-screenshot-title
return test name when there is no screenshot
2021-04-29 11:59:56 -06:00
Greg c47009c8f9
Merge pull request #29763 from woocommerce/e2e/remove-unused-product-import
remove unused product import function from jest setup script
2021-04-29 11:58:27 -06:00
Ron Rennick a1be8f9969 WIP orders rest repository 2021-04-29 14:10:50 -03:00
Ron Rennick d5d723f6d8 Merge branch 'trunk' into fix/27873 2021-04-29 13:48:07 -03:00
Ron Rennick 00f7e30db5 merge trunk 2021-04-29 13:47:25 -03:00
Ron Rennick 7e91998f1e Merge branch 'trunk' into e2e/remove-unused-product-import 2021-04-29 10:45:00 -03:00
roykho 87047c77df
Limit the new refund restock logic to order version 5.4+ 2021-04-29 06:30:53 -07:00
Ron Rennick b251bca7b6 Merge branch 'trunk' into try/individual-test-files 2021-04-29 09:54:59 -03:00
Veljko a6388d9c34 Fix test by adding new shipping zone 2021-04-29 12:27:46 +02:00
Veljko V 45177c0a6e
Merge pull request #29775 from woocommerce/try/repeatable-onboarding-flow
update onboarding flow modal checks
2021-04-29 11:49:05 +02:00
Ron Rennick 6910b2080a Merge branch 'trunk' into try/individual-test-files 2021-04-28 14:28:27 -03:00
Ron Rennick f7447b12fa remove debug code 2021-04-28 14:27:32 -03:00
Ron Rennick 08599ea206 use evalAndClick on add coupon button 2021-04-28 12:15:13 -03:00
Ron Rennick 779cfc89d4 Merge branch 'trunk' into try/repeatable-onboarding-flow 2021-04-28 10:18:39 -03:00
Nestor Soriano 10adec6b88
Improvements in the engine behind the debug tools page.
Two new optional keys have been added to the tool definition array:

- 'disabled': when true the tool button will appear disabled.
- 'needs_refresh': when running a tool, by default the tool definitions
  are retrieved first, then the selected tool is executed,
  then the definitions previously retrieved are rendered.
  When this key is true the tool definitions are retrieved again
  after execution, useful for cases where the tool description
  or button enable/disable state changes after the tool execution.

Also now if a tool execution throws an exception a notice will be
shown with the execption message, previously the exception
was unhandled.
2021-04-28 10:24:23 +02:00
Ron Rennick 0d7388e9d4 update for feedback, better wait impementation 2021-04-27 17:45:21 -03:00
Ron Rennick d67e340548 Merge branch 'trunk' into fix/order-search-test 2021-04-27 16:42:42 -03:00
Ron Rennick 6382ab0e66 give cart and checkout coupon tests unique titles 2021-04-27 16:27:35 -03:00
Ron Rennick 9369810682 update onboarding flow modal checks 2021-04-27 15:41:50 -03:00
Ron Rennick df3d3f2a37 return test name when there is no screenshot 2021-04-27 13:50:39 -03:00
roykho b69f46d7d2
Add unit tests 2021-04-27 09:29:24 -07:00
Ron Rennick cf3387df87 Merge branch 'trunk' into e2e/remove-unused-product-import 2021-04-27 11:54:20 -03:00
Ron Rennick f3652e2def update both customer billing and shipping 2021-04-27 11:16:44 -03:00
Ron Rennick 70ff64d427 add the billing address to the customer account 2021-04-26 23:44:58 -03:00
Ron Rennick b63a166dbb user customer user for order search 2021-04-26 14:44:44 -03:00
Ron Rennick f46c2fbf0b
Merge pull request #29737 from woocommerce/e2e/e2e-fix-flaky-checkout-test
Fixed checkout coupons flaky scenario in e2e suite
2021-04-26 13:16:44 -03:00
Ron Rennick 4208207e9c add backbone unblocking 2021-04-26 12:31:09 -03:00
Ron Rennick 2511fce3a7 remove unused product import function from jest setup script 2021-04-26 10:41:46 -03:00
Ron Rennick b1c6337c49
Merge pull request #29743 from woocommerce/fix/calculate-shipping-flakiness
Logout merchant and clear the cart before running tests
2021-04-26 10:23:45 -03:00
Ron Rennick c315e37c1c switch to individual test files 2021-04-26 09:52:58 -03:00
Veljko 01d0f45088 Update functions instead scenario 2021-04-23 20:03:48 +02:00
Jonathan Sadowski cd7b8ee30f Fix unit tests for new default USD currency 2021-04-23 10:03:05 -05:00
Jonathan Sadowski 55ab8cb966 Set USD as default store currency 2021-04-23 09:29:12 -05:00
Veljko 9e3a883478 Merge branch 'e2e/e2e-fix-flaky-checkout-test' into e2e/e2e-merchant-initiate-wccom 2021-04-22 21:27:41 +02:00
Greg 82348d023d Logout merchant and clear the cart before running tests 2021-04-22 11:37:12 -06:00
Veljko 00e1ca530e Fixed checkout coupons flaky scenario 2021-04-22 14:50:31 +02:00
Roy Ho 03d4d4893e
Merge pull request #28187 from woocommerce/fix/25900-take-2
Fix: image size customisation controls not shown when theme doesn't define them but Woo core does
2021-04-22 05:41:57 -07:00
Veljko e5ced9498c Add missing merchant login 2021-04-22 14:39:21 +02:00
Veljko 29f11a5b5a Added new e2e test to initiate wccom connect 2021-04-22 12:42:50 +02:00
Veljko fd85f8239b Update test scenarios to cover both flows 2021-04-22 10:21:36 +02:00
Veljko ce2f04feeb Added new scenario of non-virtual product 2021-04-22 09:47:49 +02:00
Ron Rennick c4074e7bf2 update order coupon test to use api, evalAndClick 2021-04-21 14:45:45 -03:00
Veljko 64f15fc284 Rename test scenario 2021-04-21 14:52:29 +02:00
Nestor Soriano 3a895c9eed
Move ThemeSupport class to Internal namespace, and use in 2021 theme. 2021-04-21 12:57:56 +02:00
Ron Rennick 6ece4bc82d remove duplicate publish in product test 2021-04-20 18:11:30 -03:00
Roy Ho e4fec5b914
Merge pull request #29721 from woocommerce/fix/29525
Modify wc_get_low_stock_amount function to always return a number
2021-04-20 11:56:27 -07:00
Ron Rennick 5feb03e9a7 export send to slack utils, add unblock check to variable product test 2021-04-20 13:32:14 -03:00
Nestor Soriano b88eb4c981
Rename "assertIsInt" to "assertIsInteger" and make it static
- Renaming to prevent conflicts with the existing method in
  the newer PHPUnit used in PHP 8.
- Making it static because "assertIsInt" is static too, so it'll be
  easier to replace in the future.
2021-04-20 17:16:59 +02:00
Nestor Soriano d11a20b5b4
Merge branch 'trunk' into fix/25900-take-2 2021-04-20 16:08:45 +02:00
Nestor Soriano 76a613a5bb
Modify wc_get_low_stock_amount so that it always returns an integer.
Previously, if the product didn't have an explicit low stock value
amount the value of the woocommerce_notify_low_stock_amount option,
which is a string, was returned verbatim.

Also, update related unit tests to create the option value as a string,
and to check that the value returned by woocommerce_notify_low_stock_amount
is always an integer.
2021-04-20 10:17:50 +02:00
Nestor Soriano 1008835488
Fix code sniffer violations in stock functions and its tests 2021-04-20 09:42:07 +02:00
Ron Rennick 40e887103b add coupon debug screenshot 2021-04-19 16:51:46 -03:00
Ron Rennick 511d7ed0fe replace waitfor delay with network idle 2021-04-19 16:02:30 -03:00
Ron Rennick a76b95e3dd increase order filter test before all timeout 2021-04-19 14:49:35 -03:00
Ron Rennick 682e6bd003 Merge branch 'trunk' into fix/order-search-test 2021-04-19 11:35:32 -03:00
roykho 98901dc9ec
Merge branch 'trunk' into fix/29540 2021-04-16 13:51:12 -07:00
Greg 1b8e0c2b04
Merge pull request #29616 from woocommerce/e2e/e2e-shopper-calculate-shipping
Add new e2e test shopper cart calculate shipping
2021-04-16 14:23:39 -06:00
roykho c73ce8ea04
Convert to using internal DI container 2021-04-16 12:23:40 -07:00
Veljko 1c7bec0489 Remove shipping zones remover 2021-04-16 21:22:34 +02:00
Veljko 23e09d33dd Add shipping zones remover 2021-04-16 14:11:27 +02:00
Vedanshu Jain d79e86932b
Merge pull request #29654 from woocommerce/fix/29499
Set US:CA as the default store location
2021-04-16 16:54:50 +05:30
Veljko V a2f8216b9b
Merge branch 'trunk' into e2e/e2e-shopper-calculate-shipping 2021-04-16 11:51:52 +02:00
Greg 87a6ebf03f
Merge pull request #29693 from woocommerce/e2e/e2e-shopper-order-email-received
Add new e2e test shopper order email receiving
2021-04-15 15:20:52 -06:00
Veljko 1bc0b25f0c Fix spaces 2021-04-15 14:30:06 +02:00
Veljko 5c633e1c3b Add deleting email logs if any 2021-04-15 14:01:28 +02:00
Veljko 950d08b7a5 Add new e2e test shopper order email receiving 2021-04-15 13:28:25 +02:00
Veljko a075232434 Updated code for calculating prices 2021-04-15 10:06:06 +02:00
Veljko V 80baefe89a
Merge branch 'trunk' into e2e/e2e-shopper-calculate-shipping 2021-04-15 09:10:35 +02:00
Ron Rennick fb0b51d330 merge trunk 2021-04-14 21:16:42 -03:00
Greg d496e8e3db
Merge pull request #29623 from woocommerce/e2e/28485-resets
[WIP] Reset a test site
2021-04-14 16:09:09 -06:00
Ron Rennick a1ec304f44 add waits for idle in add product to order 2021-04-14 16:09:23 -03:00