cse442-at-ub / project_s23-atomic

project_s23-atomic created by GitHub Classroom
1 stars 1 forks source link

Create cookies to stay logged in #33

Closed maalolan210 closed 1 year ago

maalolan210 commented 1 year ago

Task Tests

Test 1

  1. Go to https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q/ Click on log in.
  2. Enter the following credentials: Username [last] Password [12345678]
  3. Verify you are taken to the home page: https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q/homepage
  4. Go back to https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q/ and click the log in button, you should be redirected to the homepage instead of signing in: https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q//homepage
  5. Close the tab and go to https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q/login and do the same for https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q/homepage. In both cases you should be redirected/directly taken to the homepage because cookie is present.
  6. Inspect element, go to application tab and verify under the cookie section, there is a cookie with the account's username.

Test 2

  1. Go to https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q/ Click on log in.
  2. Since you just finished task test 1, you should still be logged in for the next hour and redirected to homepage every time.
  3. Go to inspect element -> Application -> Cookie. Delete the cookie.
  4. Go to https://www-student.cse.buffalo.edu/CSE442-542/2023-Spring/cse-442q/ and click log in. You should be sent to the login page again since the cookie no longer exists.