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

Branches - Xinran #33

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

Branches - Xinran #33

wants to merge 8 commits into from

Conversation

gracexinran
Copy link

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. selft.spotlight - sort all works by the amount of votes and return the work with most votes, return the first found work when some works have the same amount of votes
Describe how you approached testing that model method. What edge cases did you come up with? Created tests for nominal cases we expect to happen, and edge cases to make sure the system won't be broken in other conditions. I come up with edge cases like creating an invalid work without title or category. The system will pop up an error messages.
What are session and flash? What is the difference between them? Session is used to store data and won't go away after making other browser requests excepting for closing the browser. Flash is used to store one-time messages and not persistent.
What was one thing that you gained more clarity on through this assignment? Validation and relationship between models.
What is the Heroku URL of your deployed application? https://tranquil-shelf-63888.herokuapp.com
Do you have any recommendations on how we could improve this project for the next cohort? Seems like wave-3 is easier to complete than wave-2 maybe changing the order of them, and providing more resources for using different validation methods.

@jmaddox19
Copy link

MR Smaller Rubric

Media Ranker

What We're Looking For

Manual Testing

Workflow yes / no
Deployed to Heroku x
Optional: Look and feel is similar to the original (consider styling and layout) x
Before logging in
Can go into a work's show page x
Verify unable to vote on a work, and get a flash message x
Can go to "View all media" page and see three lists of works, sorted by vote x
Verify unable to create a new work when the form is empty, and details about the validation errors are visible to the user through a flash message x
Can create a new work successfully. Note the URL for this work's show page x
Can delete this work successfully x
Going back to the URL of this deleted work's show page produces a 404 or some redirect behavior (and does not try to produce a broken view) x
Log in
Logging in with a valid name changes the UI to "Logged in as" and "Logout" buttons x
Your username is listed in "View all users" page x
Voting on several different pieces of media affects the "Votes" tables shown in the work's show page and the user's show page x
Voting on the same work twice produces an error/flash message, and there is no extra vote x
Log out
Logging out showed a flash message and changed the UI x
Logging in as a new user creates a new user x
Logging in as an already existing user has a specific flash message x

Targeted Code Review

Area yes / no
git commits were small and atomic, with useful messages I would suggest committing more often in smaller pieces
Routes file shows intention in limiting routes for voting, log-in functionality, and users Yes!
The homepage view, all media view, and new works view use semantic HTML x
The model for media (likely named work.rb) has_many votes x
The model for media has methods to describe business logic, specifically for top ten and top media, possibly also for getting works by some category x
Some controller, likely the ApplicationController, has a controller filter for finding a logged in user No but not a big deal :)
Some controller, likely the WorksController, has a controller filter for finding a work x
The WorksController uses strong params x
The WorksController's code style is clean, and focused on working with requests, responses, params, session, flash x

Targed Test Review

Area yes / no
There are valid fixtures files used for users, votes, and works x
User model has tests with sections on validations (valid and invalid) and relationships (has votes) x
Vote model has tests with sections on validations (valid and invalid) and relationships (belongs to a user, belongs to a vote) x
Work model has tests with sections on validations (valid and invalid) and relationships (has votes) x
Work model has tests with a section on all business logic methods in the model, including their edge cases x

Overall Feedback

Great work! My one suggestion would be to commit more often in smaller pieces. You made a full website with user sign-in and stuff! And your tests look great! So awesome!

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.

2 participants