You have been hired as a developer at Ali Snobba - a snobby online store where customers purchase high-end merchandise like Gooey Baton handbags and Lolex watches. Your job is to implement a shopping cart that stores items while customers are in the process of ordering.
As a developer, your task is to implement the following user story, following the TDD workflow:
- Write (failing) tests before writing any code
- Only write code in response to failing test
- Make tests pass with simplest code possible
- Make a commit in git each time you get a passing test
- After getting each test to pass, refactor
- Make another commit each time you finish a refactor
- Fork this repository
- Clone your new fork
- Submit the link to your completed code in Learn.
Once cloned, be sure to share the link to the new repository with your group! You'll both submit the same link to Learn for credit.
Be sure to fork:
then Clone:
this repository!
When you are finished with the exercise, commit and push your work!
You will know you have forked and pushed properly if you see your work in Github under your github account:
not gSchool:
Be sure to make a commit in git each time you get a passing test!
- Establish rapport with your pair!
- Establish when you'll swap roles (ping pong)
- Take breaks at least once an hour.
Ali Snobba has given you the following criteria to determine completeness of your project. Note that there are no code implementation details. So you must collaborate with your partner on how best to implement the application.
- Given that I a new shopper, when I begin shopping, then I expect my cart to be empty.
- Given I have an empty cart, when I add an Item, then I expect to the price reflect the sum of all the Items in my cart.
- Given I have cart with one item, when I add more of that item, then I expect to see its quantity update on the cart.
- Given I have an empty cart, when I add items, then I expect it to see an itemized list of the items along with their price and quantity.
- Given I have a cart with items that are not on sale, when I add an item that's on sale, I expect to see it highlighted.
- Given I have a cart with items, when I remove an item, then I expect the cart to display the updated itemized list.
- Given I have one item in my cart with a quantity of 3, when I remove one, then I expect the cart to have 2 of that item.
If you get finished early, feel free to work towards these additions. This is not a exhaustive or exclusive list. Discuss with your pair what kind of improvements or changes you can make to this project.
- Add a UI of some kind
- Turn it into an API server so you can make requests against a shopping cart
- Store the data in a Database