Skip to content

Conversation

@aphunk
Copy link

@aphunk aphunk commented May 10, 2019

bEtsy

Congratulations! You're submitting your assignment! These comprehension questions should be answered by all members of your team, not by a single teammate.

Comprehension Questions

Question Answer
Each team member: what is one thing you were primarily responsible for that you're proud of? Cyndi - some of the functionality for cart, like connecting a product to an order was hard but rewarding. Jansen - Retiring products from the merchant dashboard, so that a retired product won’t show up during browsing. It was fun figuring it out the functionality on the backend, and then getting the instant gratification of clicking the button on the front end. Amy - Merchant model methods Maria - Review controller and Order model and validations
Each team member: what is one thing you were primarily responsible for that you would like targeted feedback on? Cyndi - cart (not primarily responsible since it was collaborative). Amy - Order Item controller methods. Jansen - I used code to filter products with a value of “false” in the “display” column in multiple places. It seems like I could DRY it up by stuffing it in a helper method, but...where would that helper method live, exactly?
How did your team break up the work to be done? We did the initial CRUD operations on Products as a group and then went on to split up the work based on our two big buckets: Login/logout & Orders. Amy and Maria worked on Orders to begin with, while Jansen and Cyndi worked on Login. We all wrote tests for our own methods.
How did your team utilize git to collaborate? “We utilized the shit out of it” -- Jansen Martin. We really depended on it to keep track of the work we were doing individually. Git was very useful for keeping us from working on the same parts of the project, and it was especially handy to pull work from other members of the team that would impact our own work.
What did your group do to try to keep your code DRY while many people collaborated on it? To be honest, our code is not very DRY. We did a good job in the beginning of refactoring, but it quickly became a low priority, against implementing base functionality.
What was a technical challenge that you faced as a group? We struggled with the code to filter order items by merchant on the order page.
What was a team/personal challenge that you faced as a group? Splitting up the work in a way that felt equitable was a challenge.
What was your application's ERD? (include a link) https://trello-attachments.s3.amazonaws.com/5cc8af4673df083c9e358818/5cc9e13176895c85cf960739/66173ae5a1130e30ed556e6fd8c0fe75/sweetness_ERD-100.jpg
What is your Trello URL? https://trello.com/b/jHGDpN9l/the-sweetness-project-board
What is the Heroku URL of your deployed application? http://the-sweetness.herokuapp.com/

JansenMartin and others added 30 commits May 6, 2019 11:24
…s, a filter by category method in category model, and index products view, and categories view
…s empty (no order items) then display that cart is empty
cyndilopez and others added 28 commits May 9, 2019 22:13
added format for button to add review, added simple format to add_rev…
resources :products, only: [:index, :show, :new, :create, :edit, :update]
resources :order_items, only: [:create, :edit, :update, :destroy]

resources :products do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should only have each resources listed once. Lines 4 and 7 are redundant, and line 7 will generate all the routes that line 4 omits!

@droberts-sea
Copy link

bEtsy

What We're Looking For

Manual testing

Workflow yes / no
Deployed to Heroku yes
Before logging in
Browse all products, by category, by merchant yes
Leave a review yes
Verify unable to create a new product yes - good error reporting
After logging in
Create a category yes
Create a product in that category with stock 10 yes
Add the product you created to your cart yes
Add it again (should update quantity) yes
Verify unable to increase quantity beyond stock yes
Add another merchant's product yes
Check out yes
Check that stock was reduced yes
Change order-item's status on dashboard I don't see a way to do this
Verify unable to edit another merchant's product yes - good work!
Verify unable to see another merchant's dashboard yes
Verify unable to leave a review for your own product yes

Code Review

Area yes / no
Routes
No un-needed routes generated (check reviews) mostly - see inline
Routes not overly-nested (check products and merchants) yes
Merchant dashboard and cart page use a non-parameterized routes (should pull merchant or cart ID from session) no
Controllers
Controller-filter to require login by default yes
Helper methods or filters to find logged-in user, cart, product, etc yes
No excessive business logic much of OrderItems#create should be moved to a model method (maybe Order#add_to_cart). This would help make testing easier!
Business logic that ought to live in the model
Add / remove / update product on order no
Checkout -> decrease inventory yes
Merchant's total revenue yes
Find all orders for this merchant (instance method on Merchant) yes
Find all items from this order that are sold by this merchant (instance method on Order) yes
Selected Model Tests
Add item to cart:
- Can add a good product
- Can't add a product w/o enough stock
- Can't add a retired product
- Can't add to an order that's not in cart mode
- Logic specific to this implementation
N/A
Get orders for this merchant:
- Includes all orders from this merchant
- Doesn't include orders from another merchant
- Orders are not included more than once
- Does something reasonable when there are no orders for this merchant
missing some
Selected Controller Tests
Add item to cart:
- Empty cart (should be created)
- Cart already exists (should add to same order)
- Product already in cart (should update quantity)
- Bad product ID, product is retired, quantity too high, or something like that (error)
missing new vs existing cart, but otherwise this looks good
Leave a review:
- Works when not logged in
- Works when logged in as someone other than the product's merchant
- Doesn't work if logged in as this product's merchant
- Doesn't work if validations fail
yes

Overall Feedback

Great work overall! You've built a fully functional web store from top to bottom, everything short of payment processing. This represents a huge amount of work, and you should be proud of yourselves! Your code is pretty well organized all the way from the CSS to the database, and I am quite happy with this submission. There are definitely places where things could be cleaned up or refined, but I have very little to complain about. Keep up the hard work!

Only the person who submitted the PR will get an email about this feedback. Please let the rest of your team know about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants