Work Notes: End to End (e2e) testing for the WooCommerce Checkout page


[ ] twt155 – I don’t know how to tests to see the user side, I would like for these tests to be comprehensive.

[ ] 153gsaa – Turn this post into a video for YouTube and Odysee.

New Day: Sun Jul 16 2023 16:58:50 GMT-0500 (Central Daylight Time)

I would like to use that Snapshot feature to just check if the blocks are still there and working good. This usage case could be used for testing capabilities of the Checkout without loading a product into the cart and going to woowebsite.local/checkout to see what the checkout looks like on the user side. This technique could also be used on the Edit page too.

New Day: Tue Jul 18 2023 08:55:42 GMT-0500 (Central Daylight Time)

I just got wp-env to work on my system.

New Day: Fri Jul 21 2023 11:54:02 GMT-0500 (Central Daylight Time)

I really wish that there was a self isolated containers related to test–and other dev things. So all you had to do was “npm i; npx jest” and the tests would run as they are supposed to.

I know there is wp-env but that involves a Docker container and more start scripts, like, it’s a good project but it still cumbersome.

New Day: Sat Jul 22 2023 11:40:50 GMT-0500 (Central Daylight Time)

The wp-scripts package comes with a default testing suite. Notice the e2e and unit test scripts, here.

Side Note: Testing WC Blocks, PR.

Side Notes: I could redo Ryan Kiejstra’s video on how to test blocks as the testing suite from wp-scripts has made the previous video outdated.

https://www.youtube.com/live/pI1hGE3IFqc?feature=share&t=4876

Getting Ahead: Your first 2,000 dollars on Upwork

$4.99

Are you a developer dreaming of location independence and a lucrative career? This ebook is your roadmap to success on Upwork, one of the world’s leading freelance platforms. Whether you’re a seasoned coder or just starting out, we’ll guide you through the most effective strategies to reach that crucial $2,000 milestone.

Category:

Leave a Reply