KatrinaHoffert / EatSafe

An app for finding safe places to eat
Other
2 stars 2 forks source link

Test admin interface #158

Open KatrinaHoffert opened 9 years ago

KatrinaHoffert commented 9 years ago

Things to test include:

  1. An unauthenticated user can't access /admin/list (should get redirected to /admin, the log in page).
  2. Users with correct authentication can log in and can access /admin/list.
  3. Check that /admin/list has certain locations.
  4. Incorrect credentials should fail.
  5. Create a new location (be sure to test adding a new inspection).
  6. Modify that location.
  7. Delete that location.
  8. Logging out should remove credentials (test by trying point 1 again).
  9. Cannot submit an empty form.
  10. Cannot submit with a bad postal code.
  11. Cannot submit with a bad date.
  12. Cannot submit with bad violation IDs (they're a comma separated list, so anything that's not a comma separated list or numbers that aren't in the range of 1 - 16 are invalid).
  13. Cannot submit with bad RHA (this would require manually building a form and submitting that as a POST request to /admin/list/add).

Note: the table used on the admin list page is not our code. Don't waste time testing it. Also, the validation on the add and edit pages are exactly the same. In fact, the pages themselves use the same code except for some very minor tweaks.

Also note that /admin/list takes several seconds to load. Might want to group all the tests for that page into one, to avoid unnecessary loads.