-
Notifications
You must be signed in to change notification settings - Fork 0
User Stories
kdng edited this page Mar 14, 2022
·
21 revisions
- Trainer will create a username and password to sign up for Pokeflex.
- Acceptance Criteria:
- Trainer will be redirected to the '/signup' route, and provided with a signup form, and redirected to the '/profile/:trainerId' route after signing up.
- If username already exists, we will display the message "Username already exists, please try again."
- Password needs to match in both password and verify password forms to pass, or we will display the message "Password does not match, please try again."
- Trainer will login with Username and password.
- Acceptance Criteria:
- Trainer will login via /login route, and redirected to the '/profile/:trainerId'
- If trainer incorrectly enters their username, we will display the message "Invalid username, please try again."
- If trainer incorrectly enters their password, we will display the message "Invalid password, please try again."
- Trainer will use token-based authorization for now
- A logged in trainer should be able to sign out at any time
- Acceptance Criteria:
- There should be a sign out button
- When trainer signs out, they are redirected to the '/' route.
- Revokes access from their account for now until they sign back in
- As a trainer, I can navigate to a page that displays all of the pokemons in the database.
- Acceptance Criteria:
- There should be a navigation link to the "/pokemons" page.
- The list of pokemons should be easy to read and tell apart from one another
- Each pokemon should include a link to that pokemon's single resource page (/pokemons/:pokemonId).
- As a logged in trainer, I can add pokemons to separate catchlists based off of catched status. Catch Status include: "Plan to Catch", "Currently Catching", and "Caught"
- Acceptance Criteria:
- On a specific pokemon's page:
- There should be a dropdown menu asking me which catchlist do I want to add this pokemon too, and a "Add to collection" button to confirm.
- Once I have successfully added the pokemon to my specific catchlist, I will not be redirected from the pokemon's page, but a message will be displayed saying "${Pokemon} has been successfully added to ${catchlist}."
- On a specific pokemon's page:
- As a logged in trainer, I can view all of my collections
- Acceptance Criteria:
- When I click on my specific catchlist on the sidebar, I should be able to view my collections, and the pokemons within them.
- As a logged in trainer, I should be able to edit my own collections
- Acceptance Criteria:
- Next to each pokemon in my collection, I should see an "Edit catch status" button
- Once I click on the button, I should see a dropdown allowing me to edit the catch status and remove it from the current catchlist, and add it to the selected catchlist.
- Once successfully edited, the page should refresh and render the update.
- As a logged in trainer, I should be able to delete a pokemon off of my catchlist.
- Acceptance Criteria:
- When viewing a catchlist, I should see a delete button next to the "Edit catch status" button next to the pokemon that I want to delete.
- I should be prompted to confirm that I want to delete this review.
- If deleted successfully, the page will refresh, and the post will be removed from the list.
- If the trainer attempts to delete a post that doesn't exist, display an error message to the trainer.
- As a logged in trainer, I can leave a review for said pokemon.
- Acceptance Criteria:
- At the bottom of the pokemon's page, there should be a form allowing me to add a review.
- Said review should clearly indicate what information is necessary and required.
- If the form is submitted with invalid or missing data, the form should re-render with error messages.
- If the form is submitted correctly, the page will refresh, and I should see my review without being redirected.
- As a logged in trainer, I can view reviews I have written.
- Acceptance Criteria:
- If I click on the "My Reviews" link on the sidebar, I should be redirected to the My Reviews (trainers/:trainerId/reviews) page and be able to view all the reviews I have written.
- As a logged in trainer, I can edit my own reviews
- Acceptance Criteria:
- Whether I am viewing my review from the My Reviews (trainers/:trainerId/reviews) page or from the pokemon page, I should see an "Edit Review" button next to my review. When clicked, a form appears that allows me to edit a review.
- Said review should clearly indicate what information is necessary and required.
- If the form is submitted with invalid or missing data, the form should re-render with error messages.
- If the form is submitted correctly, I should be redirected to the pokemon's page with my edited review.
- As a logged in trainer, I can delete my own reviews.
- Acceptance Criteria:
- If I am viewing my reviews from the My Reviews (trainers/:trainerId/reviews) page, I should see a delete button next to the edit button next to the review that I want to delete.
- I should be prompted to confirm that I want to delete this review.
- If deleted successfully, the page will refresh, and the post will be removed from the list.
- If the trainer attempts to delete a post that doesn't exist, display an error message to the trainer.