Skip to content

User Stories

Yassine Cherradi edited this page Jan 27, 2021 · 6 revisions
Features
Login
Signup
Demo User
Logout
User Home Page
User Profile Page
Search
Selected Link Page

Login

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.

Questions

  • Will the user enter a username or an email address to login?
    • User will login via email and password
  • What routes should we use for login?
    • User will login via / route
  • Where should the user be redirected after login?
    • User will be redirected to the /home homepage
  • Will we allow OAuth authentication via a third party?
    • Not yet -- maybe in a future story
  • What happens if the user doesn't exist yet?
    • Display the message Invalid Login please try again.
  • What happens if the user enters the wrong password?
    • Display the message Invalid Login please try again.
  • Should this story include allowing a user to reset their password?
    • Not yet -- maybe in a future story
  • Should logging in use session-based or use token-based authentication?
    • We will use token-based auth for now

Acceptance Criteria

  1. Given that I'm a logged-out user and
    • When I'm on the / route
    • Then there will be a login form with an email and password field and a "Login" button to submit the form.
  2. When I try to fill out the form with an invalid email and password combination and press Enter or press the "Login" button
    • Then at the top of the form, I will see a red message Invalid Login please try again.
  3. When I try to fill out the form with an email that doesn't exist in the system and press Enter or press the "Login" button
    • Then at the top of the form, I will see a red message Invalid Login please try again.
  4. When I try to fill out the form with a valid email and password and press press Enter or press the "Login" button
    • Then I will be redirected to the homepage at the /home route.
  5. Given that I am a logged-in user
    • When I refresh the homepage at the /home route
    • Then I will still be logged in
  6. Given that I am a logged-out user
    • When I try to navigate to the homepage at the /home route
    • Then I will be redirected to the / route

Signup

As an unauthorized user, I want to be able to sign up for the website via a signup form, so that I can access Code Hunt.

Questions

  • Will the user enter a username and an email address to signup?
  • Will we confirm their password during signup?
  • What routes should we use for signup?
  • Where should the user be redirected after signup?
  • Will we allow OAuth authentication via a third party?
  • What happens if the user with the username or email already exists?
  • What happens if the user enters the wrong password confirmation?

Acceptance Criteria

  1. Given that I'm a user who has not signed up yet and
    • When I'm on the /signup route
    • Then there will be a signup form with an email, username, bio, and password field and a "Sign Up" button to submit the form.
  2. 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 "Sign Up" button
    • Then at the top of the form, I will see a red message User with that email or username already exists.
  3. When I try to fill out the form with a password shorter than 6 characters and press Enter or press the "Sign Up" button
    • Then at the top of the form, I will see a red message Password must be at least 6 characters long.
  4. When I try to fill out the form with a valid email, username, and password and press Enter or press the "Sign Up" button
    • Then I will be redirected to the homepage at the /home route.
  5. Given that I am a user that just signed up
    • When I refresh the homepage at the /home route
    • Then I will still be logged in

Demo User

As a first-time user who just wants to demo Code Hunt, I want to be able to try out the site with a demo user login via a single button click on the login and signup form, so that I can access Code Hunt without having to go through the trouble of creating a new account.

Questions

  • What will happen when I click on the demo user button?
  • What will the demo user see when they log in?

Acceptance Criteria

  1. Given that I'm not logged in
    • When I click the Demo link
    • Then I will be rerouted to the /home path

Logout

As a logged-in user, I want to logout via a button on the navigation bar, so that I can hide my account information to the rest of the users on this device.

Questions

  • How will a user be able to log out?
  • Where should the user be redirected after successfully logging out?
  • What will happen to the user's session when he/she successfully logs out?
  • What if the user hits the backspace button after successfully logging out?

Acceptance Criteria

  1. Given that I'm a logged in user
    • When When I'm on the /home or /profile route
    • Then Then there will be a navigation bar at the top that will include a log out button for the user to click
  2. Given Given that I'm a user that has recently logged out
    • When I try to click the back button to go to the previous page (/home or /profile route)
    • Then Then I will be redirected to the / route, as my session expired when I logged out

User Home Page

As a logged-in user, I want to be able to see all the links, so that I can browse through them on Code Hunt.

Questions

  • How do I see all the links?
  • How do navigate to a link?
  • How will the links be organized?
  • What if I want to add a post?

Acceptance Criteria

  1. Given that I'm a signed up user
    • When I log in
    • Then I will be directed to the /home route where I will see all the video links
  2. Given that I'm a logged-in user
    • When I want to see all the video links filtered by category
    • Then I will be able to click on the select category link on the navbar and select the category desired from the drop down list
  3. Given that I'm a logged-in user
    • When I want to post a link
    • Then I can click on the post link on the navbar which will redirect me to the /form route where I can add my link and info regarding my post

User Profile Page

As a logged-in user, I want to be able to see all the posts that I created, so that I can browse through all my links I shared on Code Hunt.

Questions

  • How do navigate to my profile page?
  • How do I see all the posts that I shared with Code Hunt?

Acceptance Criteria

  1. Given that I'm a logged in user
    • When I want to navigate to my profile page
    • Then I will click on the profile link on the very right of the navbar.
  2. Given that I'm a logged in user
    • When I want to see all the posts that I shared with Code Hunt
    • Then I will navigate to my profile page where I will be able to see all the links that I posted

Search

As a logged-in user on any page, I want to ** have a search bar at the top of the page**, so that I can easily look for links by category and have them appear on the page.

Questions

  • What happens if a user clicks on the search bar?
  • What happens when a user submits a query?
  • What happens if no links match the query?
  • What happens if I click on a link that has been queried?

Acceptance Criteria

  1. Given that I'm a logged-in user
    • When I look at the top of any page
    • Then a search bar should be available for me to submit queries
  2. Given that I'm a logged-in user
    • When I click on the search bar
    • Then I will be able to type my search query
  3. Given that I'm a logged-in user
    • When I click on submit to right of the search bar after I type my search query
    • Then The website will submit a request to the API, gather all the links that fit that query, and then show those links on the page
  4. Given that I'm a logged-in user
    • When I submit a search query that does not exist
    • Then No links will appear on the page, and instead some text will show up alerting the user that no matches were found.
  5. Given that I'm a logged-in user
    • When I click on a link that has been queried
    • Then I will be redirected to the link page that contains complete info about the link selected

Selected Link Page

As a logged-in user, I want to ** select a link and have detailed info be displayed about the link **, so that I can easily view the link and post a comment about it.

Questions

  • What happens if a user clicks on video link?
  • What info will be displayed on a selected video link page?

Acceptance Criteria

  1. Given that I'm a logged-in user
    • When I click on a video link.
    • Then I will be redirected to the video link page that contains complete info about the link selected
  2. Given that I'm a logged-in user
    • When I'm on a selected video link page
    • Then I will be to see all the comments/reviews about the video, the category of the video, and view link to view the video