Story #89 Fix Negative Duration Bug | 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 dev-fix-negative-duration branch.
  2. Start your dev environment and log in with development2 so you have all permissions.
  3. Navigate to the Admin -> Events page
  4. Click the button in the toolbox to navigate to the event page.
  5. On the Manage Preset Events page make sure there is a button to create a new preset and that there is a table showing the current presets.
  6. Click "New Event" and try to create an event by filling out all of the required fields but giving it a negative time duration. Ensure that an error is flashed and that the event is not created.
  7. Create a valid event and ensure that you are redirected to the previous page and that you now see the event in the table.
  8. Edit the event you just created and make sure the page loads pre-populated with all the information that you set when you created it. Edit the event and make sure it updates. If you clear out the required fields and try to save you should get an error.
  9. Ensure that you can delete the event. Make sure that when you delete the event that the join table records that tie tools to it are also deleted from the database.
  10. Ensure there are no errors in the console throughout your testing and that the page is responsive on all screen sizes.

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/login/ and log in with an account that has elevated permissions to view the Admin -> Events page.
  2. Follow steps 3 and up from the dev testing instructions above.

Technical Documentation

views/admin/new_event.erb

  • Switch the logic to default to pm on the time options instead of am

routes/admin/events.rb

  • Added a check to make sure the time cannot be negative
  • Displays an error if the time is negative and refreshes the page