reaction icon indicating copy to clipboard operation
reaction copied to clipboard

Add integration tests that simulate a complete workflow

Open brent-hoover opened this issue 2 years ago • 0 comments

This is in addition to eventually writing end-to-end tests that exercise the app via the Storefront, but these can easily run without having to spin up an instance.

This might need to be broken down into smaller tasks but keeping it Epic right now.

Create working shop: (use the API for this, do not push directly to db)

  1. Create a user
  2. Create a shop
  3. Configure the shop with the example payment method and flat rate shipping method
  4. Add a product
  5. Add a tag
  6. Add navigation
  7. Add that product to the navigation
  8. Publish the product
  9. Ensure the API fetches the product when doing products by tag

Shop and Checkout as anonymous user (generally this should parallel the stuff in the "Buiding a Storefront" doc)

  1. Fetch products for category
  2. Fetch full product details (like a PDP)
  3. Add to cart
  4. Get fulfillment methods
  5. Get payment method
  6. Place order
  7. Fetch order

for extra credit ensure that email was sent by using a local sink email server

Shop as anonymous using discount code

  1. Same as above but utilize discount code
  2. Ensure discount is applied

Shop as logged in user

  1. Create a user
  2. Complete above steps as logged in user
  3. Ensure you can fetch orders as logged in user

brent-hoover avatar Mar 02 '22 00:03 brent-hoover