Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validation test #79

Open
wants to merge 276 commits into
base: master
Choose a base branch
from
Open

validation test #79

wants to merge 276 commits into from

Conversation

sarashahbaig
Copy link

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?
Each team member: what is one thing you were primarily responsible for that you would like targeted feedback on?
How did your team break up the work to be done?
How did your team utilize git to collaborate?
What did your group do to try to keep your code DRY while many people collaborated on it?
What was a technical challenge that you faced as a group?
What was a team/personal challenge that you faced as a group?
What was your application's ERD? (include a link)
What is your Trello URL?
What is the Heroku URL of your deployed application?

CEsGutierrez and others added 29 commits October 31, 2019 19:57
Order fulfillment (without tests)
add to cart from product index
Fixed catgeory display on add product form
@tildeee
Copy link

tildeee commented Nov 13, 2019

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 I could submit a review, but I don't see it
Verify unable to create a new product yes, no flash feedback for user
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 Checking out shows validation errors immediately, yes
Check that stock was reduced yes
Change order-item's status on dashboard yes, it seems parts of the UI are updated to handle this, and some aren't
Verify unable to leave a review for your own product yes
Verify unable to edit another merchant's product by manually editing URL yes
Verify unable to see another merchant's dashboard by manually editing URL yes

Code Review

Area yes / no
Routes
No un-needed routes generated (check reviews) yes
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) yes
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 OrdersController is a good spot for refactoring
Business logic that ought to live in the model
Add / remove / update product on order no
Checkout -> decrease inventory no, this logic is in OrdersController#purchase_confirmation
Merchant's total revenue yes
Find all orders for this merchant (instance method on Merchant) 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
no
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
Does not test any custom logic
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)
some missing
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, in product's controller

Overall Feedback

Great work overall! You've built a fully functional web store from top to bottom. This represents a huge amount of work, and you should be proud of yourselves!

There were some places where I was surprised by the code style. Some of this code style ranged from code that looked a lot like what we learned in classroom, to some things I've never seen before (cool custom validations!), to also some dead code.

Overall, my biggest concerns that I have this project are:

  • I'm not sure why I can't see my new Reviews :(
  • There are some areas that are missing/incorrect/unexpected flash messages
  • There are some areas that are missing/incorrect/unexpected user feedback
  • There are some areas of possibly dead code?
  • and the tests...!

You all have a lot of test weirdness (missing tests, broken tests, test comments that point out something weird going on), and I appreciate the awareness about it! I actually won't spend time on helping debug these tests, but I'll point out an observation for the future: My biggest concern is when tests are confusing. Tests that are confusing and point to a different file that's non-obvious, or something similar (I'm thinking things like "the tests for this functionality are in another controller test"), it usually points to a lot of Spaghetti Code that is all tangled up. Not much to do about this now besides reflect and look forward to another, larger project :) (In industry, I think this kind of observation would mean talking to a Tech Lead and insisting that time and strategy needs to be made for a major refactoring)

I do like some of the details that I saw in flight. None of these were required, though. That being said, I noticed nice interesting logic and UX things like:

  • the "Low in stock" message
  • Possibly registering without GitHub

Overall, I see this as a successful project, where the functionality for all the intense features (logging in, dashboard, products, categories, users) are there. However, there are just enough tiny gaps (reviews, cohesive UX) and big ones (tests) that show areas for improvement.

bEtsy is a huge project on a very short timeline, and this feedback should not at all diminish the magnitude of what you've accomplished. 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