Getting Started:
Login to Trek using any Google Account. If you don't already have a Trek account, don't worry, an account will automatically be created with the Google information used to log in.
Making a Post:
Now that you've logged in, it's time to start posting! Navigate to the Post panel to create a post. Simply fill out the post fields with the information about your travel plans and hit Submit. Now your post has been created!
Viewing Your Posts:
To view all of your posts, navigate to the Account panel. Here you can see all of your posts of both past and upcoming trips. Additionally, your profile information is viewable here, which matches your Google Account information.
Friending:
Use Trek to keep up with your friends' travel plans by friending them! On the Friends panel, search up friends and send a friend request. Once another user has sent you a friend request, you can accept or reject it on the Friends page. Once you accept this request, you will be able to see each other's posts on the Posts page.
Viewing Friends' Posts:
The Posts page features a custom order of recommended posts from accounts you have friended. For more information on this recommendation algorithm, see the description of the algorithm here.
Editing Your Account
Edit Your Account Information in the Settings Panel. Here you can change your profile picture, account name, personal information, and delete your account.
Deleting a Post
Deleting a post is mocked and the functionality is supported in the backend; however, not in the front-end
Logging Out:
Log out at any time by pressing the Logout Button at the top right of your screen.
Deleting Your Account
As of right now, account deletion has not been implemented to be possible through the User Interface of Trek. If you want to delete your Trek account, email one of the developers and we'll be happy to remove your account.
Created an 'About Us' page to let the user know how all about what Trek is about, how they can use it, and what our privacy policy is. We also added aria-labels to the major components of the app, such as the navigation bar and post creation page to guide the users who rely on the Voice Over feature. In our Page Not Found custom pages, we also provide links back to the web application so that they can easily go back to the webapp without having to npm start or type in the url again.
If you would like to work on Trek, look ahead to see how it was built!
Technologies used - Google OAuth, Firebase realtime database (NOSQL), Spark, Maven, JEST/JUnit testing
To run these tests, run firebase emulators:start
in the root directory of the project. If you want to stop the emulator, you can press Ctrl + C
to kill the program.
This file contains unit tests for the Firebase.java class and the functions in it. We cover setting and getting User and different kinds of Posts when a user has and hasn't been previously set. We look at setting friends and adding posts to pre-existing User objects and the outcome when the User object doesn't already exist. Finally, we look at deleting users and posts to check if the DB is adequately updated after calls to delete.
The HandlerTestUtilities file contains helpers for other handler test files. It contains 2 functions - tryRequestConnection and tryRequestBody. The first one sets up the connection for the a specific endpoint on the URL used for testing (we use port 111 for testing purposes). The second creates a request to an external API and returns the response body. This response body is undefined for failed requests and may return null values in such a case. Injection testing is managed through these utilities and setup/teardown within the testing suites for the API handlers, located in the server folder within tests. The TestPostHandler file has unit tests on post creation showing how one can create Train, Car and Plane posts and even posts that do not specify a particular journey type. It tests basic error cases such as not passing in the required parameters, having a start date after the end date, etc. These tests mirror the functionality in the Firebase functions.
For random testing, we try multiple setUser and delete User calls. This models how we can carry out random testing for the rest of the testing suite. It was hard to randomly test the server because we would want to cover cases with each endpoint and pass in none, some or all parameters. However, a random test that has awareness of these criterions would need to loop through multiple arrays or objects to ensure the random testing is of some value to the testing suite quality. Thus, the most appropriate place to randomly test was where we had functions that took in fewer parameters.
Developers: Mithi Jethwa (mjethwa1), Molly McHenry (mmchenr1), and Sandra Martinez (smarti86)