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

Adoptsy #27

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

Adoptsy #27

wants to merge 322 commits into from

Conversation

jfahmy
Copy link

@jfahmy jfahmy commented Oct 27, 2018

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? Jane is absent/traveling, but she built the session[:cart] and the way it handles orders and making store products aren't out of stock is awesome! Jackie - The order checkout process and the fulfillment pages. Divya - Build most of Products and Category related functions. The work with CSS that I contributed to. Maryam - css styling and oauth.
Each team member: what is one thing you were primarily responsible for that you would like targeted feedback on? Jackie - I have 4 separate routes and controller methods for the fulfillment status pages, which I know is bad code, and not dry, but I ran out of time to change it. Looking forward to hearing how I would have organized in better in views/routes/controller. Divya - I had trouble with the syntax for writing tests and intend to focus on improving it. Maryam - adding css to the different scss view pages and making it work with the application.
How did your team break up the work to be done? We each selected tasks that interested us in the beginning, separating the responsibilities out by users, products, order, and shopping cart. Then people just picked up tasks to make things come together as needed, with discussion in the morning.
How did your team utilize git to collaborate? We had a step process for how to branch and merge back into master, but we did have some difficulties with merging and maybe not understanding the changes we were getting when we pulled.
What did your group do to try to keep your code DRY while many people collaborated on it? We had members go back and review the code. We're keeping this answer dry.
What was a technical challenge that you faced as a group? Time was a challenge. How we implemented features was not always the best way because we just wanted to make sure we got the project done.
What was a team/personal challenge that you faced as a group? We tried to divide up work in the beginning, but it was hard to understand what pieces needed to be done first and how things would depend on each other. This might have led to group members feeling like they missed out on learning how features were implemented and not getting to work on the parts they wanted. (We are not project managers!)
What was your application's ERD? (include a link) https://www.lucidchart.com/invitations/accept/22d60a1b-3b01-4489-9760-aad52184840d
What is your Trello URL? https://trello.com/b/rHxeHHJD/adoptsy
What is the Heroku URL of your deployed application? https://adoptsy.herokuapp.com/

JaneEdwMcN and others added 30 commits October 20, 2018 17:17

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@dHelmgren
Copy link

bEtsy

What We're Looking For

Feature Feedback
Baseline
Appropriate Git Usage with all members contributing Yes
Answered comprehension questions Yes
Trello board is created and utilized in project management Yes
Heroku instance is online Yes
General
Nested routes follow RESTful conventions Yes
oAuth used for User authentication Authorization/Authentication is Oauth, but not working on the Heroku Deployment.
Functionality restricted based on user roles Yes
Products can be added and removed from cart yes
Users can look up past orders by ID yes
Merchants can add, edit and view their products Personal Opinion: The UX for product retirement could be better. Also, I would prefer to make it so that nobody but the owner can access the show page.
Errors are reported to the user yes
Order Functionality
Reduces products' inventory yes
Cannot order products that are out of stock yes
Changes order state yes
Clears current cart yes
Database
ERD includes all necessary tables and relationships Yes
Table relationships Good!
Models
Validation rules for Models Yes!
Business logic is in the models Yes!
Controllers
Controller Filters used to DRY up controller code Yes!
Testing
Model Testing Good
Controller Testing No authorization testing? see comment!
Session Testing Good!
SimpleCov at 90% for controller and model tests Yes
Front-end
The app is styled to create an attractive user interface Yes!
Content is organized with HTML5 semantic tags The HTML could be more semantic. Consider the the use of and
in future projects.
CSS is DRY Yes, but it's not terribly well organized, see comment!
Overall Good work everyone. This project looks very good to end users, and aside from a couple of hitches works really well. Take a look at why the Oauth isn't working on Heroku, as that seems like a pretty important piece to have working if folks check your portfolio!

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

Copy link

@dHelmgren dHelmgren left a comment

Choose a reason for hiding this comment

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

Sorry inline comments are a bit sparse, I could only realistically dig deep on so much per team. Great job overall, I think you all did a very good job of identifying issues in your own code!

end

describe "create" do
it "can create a product" do

Choose a reason for hiding this comment

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

It doesn't look like you've included any authorization testing, which I would say is a problem! Remember, you need to test to see if people who aren't logged in get bounced from these actions

Choose a reason for hiding this comment

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

Hi Devin,
The Oauth works fine for me! Just tested it in Chrome and Safari. As far as I know it worked for my teammates too. Did you try clearing your cookies, using incognito, or logging in via Safari?

Choose a reason for hiding this comment

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

I will certainly give it another try, but yeah, I did try clearing cookies and using incognito. I'll see if Safari does any favors for me.

Side note, Oauth login is different from the authorization testing I'm talking about in the top comment in this thread.

get "/fulfillment", to: "orders#fulfillment", as: "get_orders"
get "/fulfillment/paid", to: "orders#paid", as: "paid_orders"
get "/fulfillment/pending", to: "orders#completed", as: "completed_orders"
get "/fulfillment/cancelled", to: "orders#cancelled", as: "cancelled_orders"

Choose a reason for hiding this comment

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

This might be collapsed to a single route:

get "/fulfillment/:method", to: "orders#fulfillment", as: "manage_fulfillment_orders"

@orderproducts = Order.find_orderproducts(@current_user, nil)
@total_revenue = Order.products_sold_total(@current_user, @orderproducts)
@count = Order.count_orders(@current_user, nil)
else

Choose a reason for hiding this comment

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

@jfahmy , so when I look at these 4 controller actions, I see that most of the code is identical. I think that the right way to manage this set of pages might be to use a single rout with a "method" param that allows you to choose between a few different options. The :method would control the kind of error, and could be passed to the find_orderproducts and count_orders methods directly. for any of these that render views, a render command in a switch statement would work well.

.user-products-img img{
width: 200px;
height: auto;
padding: 1em;

Choose a reason for hiding this comment

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

@marshi23 This is a good example of something I would have moved into a model-specific .scss file. This only ends up styling things on product pages, so having it appear anywhere else as part of the css is unnecessiary, and makes looking for page specific CSS really hard.


it "will update a product with a valid post request" do
tan = users(:tan)
perform_login(tan)

Choose a reason for hiding this comment

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

@Naltrexone This two-line element appears a lot in this set of tests, and is a good candidate for a let command.

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.

None yet

5 participants