impress-org / donation-block-for-stripe

A beautiful donation form block for WordPress. Accept donations in minutes using Stripe.
7 stars 1 forks source link

Block should have basic e2e tests written #49

Open DevinWalker opened 2 years ago

DevinWalker commented 2 years ago

Details

This is the perfect time to get started with end to end testing the block.

E2E w/ Gutenberg Info

It looks like Gutenberg is in the process of migrating from Puppeteer to Playwright: https://github.com/WordPress/gutenberg/issues/38851

There's tons of resources above, but it's going to take a bit of digging to fully understand how we can utilize this correctly.

📑 Good Resources:

A few helpful resources I found while doing research...

Migrating WordPress e2e tests to Playwright

https://make.wordpress.org/core/2022/03/23/migrating-wordpress-e2e-tests-to-playwright/

@wordpress/e2e-test-utils: It is a utility package with basic tests that are reused by other E2E test packages and suites in Gutenberg, in WordPress Core and by third parties. This package is now deprecated and a new package @wordpress/e2e-test-utils-playwright was introduced internally for the migration process.


E2E Tests Utils Playwright Package:

https://github.com/WordPress/gutenberg/tree/HEAD/packages/e2e-test-utils-playwright


DevinWalker commented 2 years ago

Ok - We're doing a pivot here because @JasonTheAdams kindly recommended we stick to using Ghost Inspector, which we're using on GiveWP and the website, to run e2e tests.

@Benunc has shown me the ropes on this and I'm going to start building out some tests today using WP Sandbox.