Story #5 Member Sign Up Information Update | User and Technical Documentation - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. Make sure you are on the most recent version of the Development branch.
  2. Start your dev environment.
  3. Navigate to /new_members/
  4. Choose a new member orientation to sign up for
  5. Fill out the form and verify that the fields of first name, last name, email, and university status exist.
  6. After submitting the form, verify that the user you created is in the database along with an auto populated username based on the first initial of their first name, first 5 letters of their last name, and a number starting at 2 and counting up for each additional duplicate username.
  7. Attempt to create another user with the same name and verify that their auto generated username has a number appended onto the end, starting at 2 and increasing chronologically.
  8. Ensure there are no errors in the console throughout your testing and that the page is still responsive on all screen sizes.

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/new_members/
  2. Follow steps 4 and up from the dev testing instructions above.

Technical Documentation

routes/new_members.rb

  • Create a user with the parameters from the signup post request
  • Added a new constant variable username_parameters based on these parameters:
    • First letter of first name
    • First 5 letters of last name
  • Created a loop for appending a number on the end of automatically generated usernames in the case of duplicate usernames:
    • If the username is not in the database, append a number starting at 2
    • If the username is in the database, append a number incremented 1 higher than the current highest number
    • Add the username to the user object
  • Save the user object to the database

views/new_member_signup.erb

  • Updated the form to be a field set
  • Updated the form to have a separate input for first and last name
  • Updated the form to have an email address input box
  • Updated the form to have a drop down for University Status
  • Changed the style class on a few buttons to fit 100% of the width