-
Notifications
You must be signed in to change notification settings - Fork 1
User Stories
Lazytangent edited this page Jan 23, 2021
·
7 revisions
As an unauthorized user, I want to be able to create an account, so that I can use the application's services.
- Will the user enter a username and an email to signup?
- Both a username and email will be required
- Will we confirm their password during signup?
- Yes
- What routes should we use for signup?
- None, the signup form will be a modal that pops up when called upon
- Where should the user be redirected after signup?
- The user will be redirected to the main Drinks page, where they can browse the selection of drinks available.
- Will we allow OAuth authentication via a third party?
- Not yet
- What happens if the user with the username or email already exists?
- The form will render the error upon submission.
- What happens if the user enters the wrong password confirmation?
- The form will render the error upon submission.
-
Given that I'm a user who has not signed up yet and
-
When I click on the
Register
button in the NavBar - Then there will be a form that pops up with an email, username, and password field with a "Register" button to submit the form.
-
When I click on the
-
Given that I'm a user trying to make an account,
- When I try to fill out the form with an email or username that already exists with a valid password and press Enter or press the "Register" button
-
Then at the top of the form, I will see a message
User with that username already exists
orUser with that email already exists
.
-
Given that I'm a user trying to make an account,
- When I try to fill out the form with a password shorter than 6 characters and press Enter or press the "Register" button,
-
Then at the top of the form, I will see a message
Password must be at least 6 characters long.
-
Given that I'm a user trying to make an account,
- When I try to fill out the form with a valid email, username, and password and press Enter or press the "Register" button,
-
Then I will be redirected to the main Drinks page at
/drinks
-
Given that I'm a user that just signed up
-
When I refresh the homepage at the
/drinks
route - Then I will still be logged in
-
When I refresh the homepage at the
As an unauthorized user, I want to be able to login to the website via a form, so that I can access my private information.
- Will the user use a username or email address to log in?
- User can use either their username or email address to log in.
- What routes should we use for log in?
- User will log in via the log in modal that will pop up when called upon.
- Where should the user be redirected after login?
- User will be redirected to
/drinks
page
- User will be redirected to
- Will we allow OAuth authentication via a third party?
- Not yet
- What happens if the user doesn't exist yet or the user enters a field with the wrong credentials?
- Display the message Invalid Login with the given credentials.
- Will the user be able to reset their password?
- Not yet
- Should logging in use session-based or token-based authentication?
- We will use token-based authentication.
-
Given that I'm a logged-out user and
- When I click on the Login button in the NavBar
- Then there will be a login form with a "Username or Email" field, a password field, and a "Login" button to submit the form.
-
Given that I'm a logged-out user and
- When I try to fill out the form with an invalid email/username and password combination and press Enter or press the "Login" button
-
Then at the top of the form, I will see a message
Invalid Login. Please try again.
-
Given that I'm a logged-out user and
- When I try to fill out the form with a valid username/email and password combination and press Enter or press the "Login" button
-
Then I will be redirected to the
/drinks
page
-
Given that I'm a logged in user
-
When I refresh the homepage at the
/drinks
route - Then I will still be logged in
-
When I refresh the homepage at the
-
Given that I am a logged-out user
-
When I try to navigate to the homepage at the
/drinks
route -
Then I will be redirected to the
/
main page
-
When I try to navigate to the homepage at the
As an authorized user, I want to be able to log out of my account, so that I can hide my account information from the rest of the users on this device.
- What happens when the user logs out?
- User will be redirected to the
/
page with a message at the top telling them the log out was successful.
- User will be redirected to the
- How will the user log out?
- User will click the
Log out
button in the User menu that is accessible from the NavBar on any page of the site.
- User will click the
-
Given that I'm a logged-in user and
- When I'm on any route
- Then I should be able to access the user menu in the NavBar and log out of my account
-
Given that I'm a logged-in user and
-
When I click the
Log out
button -
Then I will be redirected back to the
/
page.
-
When I click the
As a prospective user who just wants to demo the functionality of The Juice Box, I want to be able to try out the site with a demo user login via a single click on the login and register forms, so that I can access The Juice Box without having to go through the trouble of creating a new account.
- Will the user enter a username or an email address to login?
- User will login via the "Demo User Login" button.
- What routes should should we use for login?
- User will log in via the log in modal that will pop up when called upon.
- Where should the user be redirected after login?
- User will be redirected to
/drinks
.
- User will be redirected to
-
Given that I am a logged-out user
-
When I'm on the
Login
orRegister
forms - Then there will be a button that will let me login as a demo user
-
When I'm on the
-
Given that I am logged in as the demo user
- When I refresh any page
- Then I should still be logged in as the demo user
As a logged in user, I want to be able to see all of the possible drinks, so I can choose one to make or drink.
- What route will show all the drinks?
/drinks
- What route will show an individual drink?
/drinks/:drinkId
-
Given that I am a logged in user
-
When I'm on the
/drinks
page - Then I will see all the drinks on the site
-
When I'm on the
-
Given that I am a logged in user
-
When I'm on a
/drinks/:drinkId
page - Then I will see the details for the drink with the corresponding id
-
When I'm on a
As a logged in user, I want to be able to create a new drink, so that I can share my drinks with everyone else.
- What route will show the form to create a new drink?
/drinks/new
-
Given that I am a logged in user
-
When I navigate to
/drinks/new
- Then I will see a form with name and description fields.
-
When I navigate to
-
Given that I am a logged in user
-
When I submit the form on
/drinks/new
- Then I will be redirected to the new drinks page
-
When I submit the form on
As a logged in user, I want to be able to delete one of my drinks, so that I can clean up my creations.
- How will a user delete one of their drinks?
- There will be a "Delete" button on the drink detail page if the user is the same user that created the drink.
- Where will the app redirect to when a drink is delete successfully?
- The app will redirect to the
/drinks
page with a message at the top notifying the user that their drink was deleted successfully.
- The app will redirect to the
-
Given that I am a logged in user and the creator of a drink
- When I navigate to the drink's details page
- Then I will see the option to delete it
-
Given that I am a logged in user and the creator of a drink
- When I click on the delete button on the drink's detail page
-
Then I will get redirected to the
/drinks
page and shown a message notifying me that my drink was successfully deleted
-
Given that I am a logged in user and not the creator of a drink
- When I navigate to the drink's detail page
- Then I will not get the option to delete the drink
- How will a user edit one of their drinks?
- There will be an "Edit" button on the drink detail page if the user is the same user that created the drink.
- Where will the app redirect when the "Edit" button is clicked?
- The user will stay on the detail page, and the name and description fields will change into input fields. Essentially rendering the form in-place
- Where will the app redirect when the "Edit" form is submitted?
- The user will be redirected back to an updated detail page
-
Given that I am a logged in user and the creator of a drink
- When I navigate to the drink's details page
- Then I will see the option to edit it
-
Given that I am a logged in user and the creator of a drink
- When I click on the edit button on the drink's detail page
- Then I will see a form with the name and description fields filled in with the old data
-
Given that I am a logged in user and the creator of a drink
- When I submit the edit form for one of my drinks
- Then I will see the updated drink's detail page
-
Given that I am a logged in user and not the creator of a drink
- When I navigate to the drink's detail page
- Then I will not see the option to edit it
As a logged in user, I want to be able to create a review for a drink, so that I can share my opinions about the drink.
- How will a logged in user create a review for a drink?
- On the
/drink/:drinkId
page that corresponds to that drink, there will be a review section with a button that will render a form for users to leave reviews.
- On the
-
Given that I am a logged in user
- When I navigate to a drink's detail page
- Then I will see a button "Add a Review"
-
Given that I am a logged in user
- When I click the "Add a Review" button on a drink's detail page
- Then I will see an input field that lets me type out my review and a button to submit my review
-
Given that I am a logged in user
- When I submit my review
- Then I will see my review on drink's detail page
As a logged in user, I want to be able to see all the reviews for a drink, so that I can know what others think about it.
- Where will all the reviews be shown for a specific drink?
- On that drink's detail page
-
Given that I am a logged in user
- When I navigate to a drink's detail page
- Then I will be able to see all the reviews left on the drink's page
As a logged in user, I want to be able to update one of my reviews for a drink, so that I can make it a better review.
- How will a user be able to update one of their reviews on a drink?
- There will be an "Edit" button next to a review that they wrote that will render a form so that they can edit in place
-
Given that I am a logged in user
- When I am on a drink's detail page where I have left a review
- Then I will see an "Edit Review" button next to each of my reviews on this drink
-
Given that I am a logged in user
- When I click on the "Edit Review" button
- Then I will see a form with the fields pre-filled based on my previous review
-
Given that I am a logged in user
- When I submit my edit of my review
-
Then I will see my new review in place of my old review with an
(edited)
by the new timestamp.
As a logged in user, I want to be able to delete one of my reviews, so that I can remove an old review that I've changed my opinion on.
- How will a user be able to delete one of their reviews of a drink?
- The user will see a "Delete" button next to their reviews.
-
Given that I am a logged in user
- When I am on a drink's detail page where I have left a review
- Then I will see a "Delete Review" button next to my reviews
-
Given that I am a logged in user
- When I click on a "Delete Review" button
- Then I will see the drink's detail page with a message at the top notifying me that I have successfully deleted my review
As a logged in user, I want to be able to see all the possible venues, so that I can choose one to go visit.
- Where will a user be able to browse the venues?
- On the
/venues
route
- On the
- Where will a user be able to see the details of a specific venue?
- On that venues
/venues/:venueId
route
- On that venues
-
Given that I am a logged in user
-
When I navigate to the
/venues
route - Then I will see all the possible venues listed
-
When I navigate to the
-
Given that I am a logged in user
- When I click on a venue
- Then I will see that venue's detail page
- Where will a user be able to check in at a venue?
- On both the
/venues
route and the/venues/:venueId
route for the specific venue
- On both the
- Will a user be able to delete one of their check ins?
- They will, but there will be a pop-up that makes them confirm that they are also willing to delete all of their reviews for that check in.
- How often should a user be able to check in at a venue?
- The button for checking in will only become available after an hour past the most recent check in.
-
Given that I am a logged in user
-
When I click on the "Check In" button on the
/venues
route or the venue's detail page - Then I should be marked as checked in and the "Check In" button should become disabled and say "Checked In"
-
When I click on the "Check In" button on the
-
Given that I am a logged in user
- When I am on any profile page
- Then I should be able to see all of that user's check ins
-
Given that I am a logged in user
- When I am on my profile page
- Then I should be able to edit my check-in time
-
Given that I am a logged in user
- When I am on my profile page
- Then I should be able to delete a check in
As a logged in user who has checked in at a venue, I want to be able to create a review for said venue, so that I can share my opinion of it.
- Where will a user be able to create a review for a venue?
- Users will be able to create a review on that venues page if they have checked-in there at least once
-
Given that I am a logged in user
- When I navigate to a venue's details page
- Then I should see a button to create a review
-
Given that I am a logged in user
- When I click on the "Create a Review" button
- Then I should see a form with fields for a review body and a dropdown allowing me to select a check in to connect this review to
-
Given that I am a logged in user
- When I submit my review
- Then I will see it loaded on the venue's details page
As a logged in user, I want to be able to see all the reviews for a venue, so that I can better decide whether or not I should go there.
- Where will a user be able to see all the reviews for a venue?
- Users will be able to see all the reviews for a given venue on that venue's detail page
-
Given that I am a logged in user
- When I am on a venue's details page
- Then I will be able to see all the reviews written about it
As a logged in user, I want to be able to edit one of my reviews for a venue, so that I can share my updated opinion.
- Where will a user be able to update one of their reviews for a venue?
- On the venue's detail page
-
Given that I am a logged in user
- When I am on a venue's details page
- Then I will see "Edit your Review" buttons next to my reviews
-
Given that I am a logged in user
- When I click on an "Edit your Review" button
- Then I will see a form rendered with the fields based on my previous review
-
Given that I am a logged in user
- When I submit my edited review
- Then I will see the venue's details page with my updated review
As a logged in user, I want to be able to delete one of my reviews for a venue, so that I can remove an old opinion.
- Where will a user be able to delete one of their reviews?
- Users will be able to delete one of their reviews either on the venue's details page or their personal profile page
-
Given that I am a logged in user
- When I am on a venue's details page where I have left a review
- Then I will see a "Delete your Review" button next to my reviews
-
Given that I am a logged in user
- When I am on my personal profile page
- Then I will see a "Delete your Review" button next to my reviews
-
Given that I am a logged in user
- When I am click on a "Delete your Review" button on any of my reviews
- Then I should see the same page I was on with a message at the top notifying me that my review has been successfully deleted