* Refactor e2e tests slightly for better efficiency
* Add "proceedToCheckout" shopper method & refactor code
* Use "beforeEach" in case we add more test cases
I've kept the "afterAll" function to reset any side effects at the end
of this file's tests
* Use "beforeEach" in "checkout-place-order-as-guest" file
* Use BASE_URL in shopper.block.goToBlockPage
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
* Add "goToCheckout" method in "shopper.block"
Instead of using "shopper.goToCheckoutBlock" method, it will much easier
to maintain the following structure "shopper.block.goToCheckout"
* Create a constant for billing details
* Create "fillBillingDetails" shopper method
* Add "placeOrder" method to "shopper"
* Enable "Cash on delivery" payment method for our test
* Update "@woocommerce/e2e-utils" package
Some new useful e2e utility functions weren't avaiable in the previous version
* Add E2E test for "Can place an order as guest"
* Fix mini-cart failing E2E tests
In case this fixwoocommerce/woocommerce-blocks#6006 isn't merged yet, this commit can be used to pass all
E2E tests
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
* Shopper → Cart → Can proceed to checkout
* Refactor the code for E2E testing
Introduce some discussed solution to structure and optimize the code
* Resolve some conflicts with the trunk branch
* Remove method overriding and refactor code
We are trying to avoid overriding exiting E2E Woo's utility functions
Instead we can use our own "shopper.block"
* Use a consistent constant naming convention
Co-authored-by: Saad Tarhi <saad.tarhi@automattic.com>
* Add constants for C & C pages in our E2E tests
Inspired by WC E2E this will avoid going to admin to find out the links for these pages.
* Select C & C pages by using the main navigation links
* Fix function calls
* Revert back to using constants for C & C block pages' URLs
reverts 9587a0bd5efa5d97b484cd8d1bf927ff50f8e014 and bd7e2f996792d887756c0a0f4a10e6886574e77b