nss-evening-cohort-11 / WildflowerCoffeeGifts

0 stars 2 forks source link

Ars place order #117

Closed ancasimon closed 3 years ago

ancasimon commented 3 years ago

This PR includes the features in these 2 tickets:

  1. PURCH 4 - Allow a user to place an order #56
  2. PURCH 5 - Customers can choose one of their payment types when purchasing their shopping cart #81

To test:

  1. SEE PROJECT TICKET #56 - COMPLETE ALL PREREQUISITES listed there - there are some table changes as well as a plugin to install!!!
  2. Create a new user or pick an active user and add their ID in the userId variable in state in these 2 files: ShoppingCart.js and SingleProductView.js.
  3. Go to the app and log in.
  4. Go to the cart > if this user doesn't have a pending order, then start one by clicking Start Shopping.
  5. Add some products to the cart.
  6. Click on Add Delivery Address and fill in all the fields with delivery info.
  7. Click on Add Billing ADdress and confirm the data / change it if you would like.
  8. Click on Add Payment Details > on the modal that opens up, select the payment type you want to use > Confirm that all the data filled in correctly in the fields below if you selected a previous payment type > If this is a new payment type, fill in or update the fields as needed > Click Place Order.
  9. Expected result: You should see a confirmation message that the order is on its way > NEXT: go to the database and run a query for all orders > you should see the order you were on (check based on userId) with an IsCompleted value of 1 / K true and all the updates you made (delivery address etc) > if you changed the billing address for the user or the payment type info, run queries on the Users and PaymentTypes tables to confirm the changes.
ancasimon commented 3 years ago

Beth reviewed and approved it.