Contributions are welcome!
There's a few ways you can go about testing your contribution.
We have a few Playwright e2e tests in the e2e directory. Right now they test checking out with a product that requires a one time payment and checking out with a product that requires a recurring payment.
While we run these tests in CI, you can (and, if your code changes checkout, probably should) run them locally too:
yarn dlx playwright test e2e
If you want to actually see the tests run in the browser, add the --headed
flag:
yarn dlx playwright test e2e --headed
Screen.Recording.2022-04-28.at.3.00.35.PM.mov
When you open a pull request, Netlify deploys your branch! Check the deploy preview and make sure everything looks ok:
If your contribution affects the api side, we have a few tests you can run to make sure everything still works:
yarn rw test api
You may need to configure a TEST_DATABASE_URL
.
You get your TEST_DATABASE_URL
the same way you got your DATABASE_URL
—see the README.md
for more.
While it gets old fast, you can of course test things manually by going through the checkout yourself. Just make sure to use one of stripe's test cards when filling out your payment information.
There's a few conventions that we follow.
We use feature branches that start with one of three slash prefixes:
feat/
—a brand new featurebug/
—a bug fixenhance/
—an improvement to an already-existing feature
Here's some examples of goodly-named branches:
feat/add-CONTRIBUTING.md
bug/fix-webhooks
enhance/update-stripe-element-styling