reactioncommerce / reaction

Mailchimp Open Commerce is an API-first, headless commerce platform built using Node.js, React, GraphQL. Deployed via Docker and Kubernetes.
https://mailchimp.com/developer/open-commerce/
GNU General Public License v3.0
12.34k stars 2.17k forks source link

Promotions UAT testing #6799

Open brent-hoover opened 1 year ago

brent-hoover commented 1 year ago

Working from the UAT testing doc perform testing and open issues for any bugs found.

Scenario 1:

”As a merchant, I want to create a promotion to offer 10% of all eligible items in my cart, excluding products from Brand = Nike or Brand = The North Face.”

Scenario 2:

“As a merchant, I want to create a promotion to offer $10 off the merchandise subtotal (ie excludes shipping and tax) of all eligible items in my cart.”

Scenario 3

“As a merchant, I want to get 20% off any XXX brand products added to the cart.”

Scenario 4

“Get 10% OFF Clearance Items”

sujithvn commented 1 year ago

Scenario 1

  1. Delete the existing reaction database
  2. Ensure you have plugins.json updated to include sample-data plugin and also update .env file to include LOAD_SAMPLE_DATA=true
  3. Start the API with pnpm --filter=reaction run start:dev
  4. Stop the API with Ctrl-C and start the API again as above (this is temp workaround for sequence issue)
  5. Open the browser and navigate to http://localhost:4080 for Admin UI. Login with admin credentials
  6. Navigate to the Products and click on the first product - "Men's Waterproof Outdoor Rain Jacket”
  7. Set the vendor to "The North Face" and Save and Publish that product.
  8. Navigate to the Products and click on the second product - "Women's Outwear Sportswear Hoodie”
  9. Set the vendor to "Nike" and Save and Publish that product.
  10. Start Kinetic with pnpm run dev and open the browser and navigate to http://localhost:3000 for Kinetic UI. Login with admin credentials
  11. Follow the exact same steps in UAT document for Scenario1 Phase 1 to create a Promotion. Make sure all the existing promotions are "Disabled" as mentioned in General Setup.
  12. Wait for the promotion to be "active".
  13. Start Storefront with yarn dev and open the browser and navigate to the http://localhost:4000/ for storefront
  14. Add the “Men’s Casual Rugged Jacket” to the cart.
  15. If you go to the Cart page, you can observe the the total of “$44.99” reflects the %10 discount on the $49.99 price
  16. Go back to Homepage and verify that the vendor for “Men’s Waterproof Outdoor Rain Jacket” is set to “The North Face”
  17. Add this item to the cart
  18. If you go to the Cart page, you can observe the the total of “$94.98” Note that this item is not discounted and the total only reflects the %10 discount on the first item At this stage, the API console does NOT show any errors and only has the informational logs. There are NO errors in the browser console also (apart from the ones for missing images). If you click the "Checkout" button, there is no response/output/errors in both the browser console and API console.

Created an issue for this https://github.com/reactioncommerce/reaction/issues/6803

sujithvn commented 1 year ago

Scenario 4

sujithvn commented 1 year ago

Scenario 2

sujithvn commented 1 year ago

Scenario 3