Testing - runer112/wassall-zachary-databasedev GitHub Wiki
1. Manage user-user relationship
- Log in as alice.
- Click on "Profile" in the navbar.
- Copy the URL of alice's profile (this is not intended as a networking site, so profiles links are private and need to be manually shared).
- Click on "Logout" in the navbar.
- Log in as dan.
- Navigate to the copied URL of alice's profile.
- Verify that a "Friend" button exists in the top-right.
- Click on the "Friend" button in the top-right.
- Click on "Profile" in the navbar to go to dan's profile.
- Copy the URL of dan's profile.
- Click on "Logout" in the navbar.
- Log in as alice.
- Navigate to copied the URL of dan's profile.
- Click on the "Friend" button in the top-right.
- Verify that alice appears in dan's list of friends.
- Click on "alice" or "Profile" in the navbar to return to alice's profile.
- Verify that dan appears in alice's list of friends.
- Click on "dan" in alice's list of friends.
- Verify that the "Friend" button now says "Unfriend".
- Click on the "Unfriend" button in the top-right.
- Click on "Profile" in the navbar.
- Verify that dan is no longer a friend of alice's.
2. Domain object search
- Log in as any user (or no user).
- Click on "Stops" in the navbar.
- Type part of a stop name (ex. "rug", "street") and press "enter" or click the search button.
- Verify that matching stop names are populated (and sorted alphabetically).
3. Domain object detail
- Log in as any user (or no user).
- Click on "Stops" in the navbar.
- Type part of a stop name (ex. "rug", "street").
- Select a stop from the search results.
- Select a route.
- Verify that the detail page includes: stop name, route name and direction, a map of the stop location, and predicted future departure times.
4. View domain-user relationships
- Log in as alice.
- Verify that favorite route/stop predicted departure times (for Ruggles and North Station on the Orange Line) appear on the home page.
- Click on "Profile" in the navbar.
- Verify that the same favorite route/stop predicted departure times appear on alice's profile page.
- Click on alice's friend "bob".
- Verify that different favorite route/stop predicted departure times appear on bob's profile page.
5. View user-user relationships
- Log in as alice.
- Click on "Profile" in the navbar.
- Verify that alice is friends with bob and charlie.
- Click on alice's friend "bob".
- Verify that bob is friends with only alice.
6. Manage domain-user relationship
- Log in as alice.
- Click on "Routes" in the navbar.
- Select a route.
- Select a stop.
- Click on the "Favorite" button in the top-right to create a favorite.
- Go to the home page ("ProximiT" in the navbar) and verify that the favorite has been added.
- Click on the stop/route name of the added favorite to return to the stop info page.
- Click on the "Unfavorite" button in the rop-right to delete the favorite.
- Go to the home page ("ProximiT" in the navbar) and verify that the favorite has been deleted.
7a. View domain-domain relationships
- Log in as alice.
- Click on "Routes" in the navbar.
- Select "Orange Line (Northbound)".
- Verify that route alerts appear under the header.
- Verify that all stops on that route are listed (and in the correct order; Forest Hills should be first, Oak Grove should be list).
7b. Manage domain-domain relationship (as official)
- Log in as bob (not alice!).
- Click on "Routes" in the navbar.
- Select a route.
- At the bottom of the page, enter an alert message.
- Click on the "Create" button.
- Verify that the route alert appears under the header with the relative time posted (should initially say "a few seconds ago").
- Click on "Routes" in the navbar.
- Select a different route (different line, not just direction) from the route selected in step 3.
- Verify that the route alert does not appear.
- Click on "Routes" in the navbar.
- Select the route selected in step 3.
- Verify that the created alert has persisted.
- Click the "x" on the right of the created alert to delete it.
- Refresh the page.
- Verify that the created alert has been deleted.
8. Create user
There is no admin-specific method for this. An admin simply registers a new user like anyone else.
- If logged in, click on "Logout" in the navbar.
- Click on "Register" in the navbar.
- Enter a username, password, and password verification.
- Click on the "Register" button.
- Verify that you are now logged in; the navbar should have "Profile" and "Logout" links.
- Click on "Profile" in the navbar and verify that it shows the created account's profile.
9. List users (as admin)
- Log in as admin.
- Click on "Admin > Users" in the navbar.
- Verify that the list of users appears.
10. Update user (as admin)
Please only test this with a user you have created. The existing users have been set up for other tests.
- Log in as admin.
- Click on "Admin > Users" in the navbar.
- Select a user (besides admin).
- Verify that the user detail fields are editable.
- Make some changes.
- Click on the "Save" button.
- Refresh the page.
- Verify that the changes have persisted.
11. Delete user (as admin)
Please only test this with a user you have created. The existing users have been set up for other tests.
- Log in as admin.
- Click on "Admin > Users" in the navbar.
- Either click the "x" to the right of a user's name, or click on the user and then the "Delete" button to delete a user.
- Click on "Logout" in the navbar.
- Click on "Login" in the navbar.
- Attempt to log in with the deleted user's credentials.
- Verify that the deleted user's credentials no longer work.