UserGuide for the new features and how to use them and testing
Anonymous Feature How to use the Anonymous feature: As a user, you will be able to post anonymous posts so you can ask questions without being judged. However, the user needs to log in or register to be able to make any post, which includes the anonymous post. Upon signing in or registering, you will be faced with the home page which has many different categories for posts. These include: Announcements, General Discussion, Comments & feedback, and Blogs. In all of these categories a registered user can make a post. When the user clicks on any of these categories they will be taken to the specific page of that category, which then they can make a post. When they click create a new topic, they will find an “Anonymous” toggle button that they can click if they want to post an anonymous question. Once they click the submit button if the post is made to be anonymous their name will not be shown instead in place of their username it will display “Anonymous” and instead of their avatar being the first letter of their name and have a colored background it will be a gray background a a question mark as their avatar. If they want to go back and see the list of topics they have, they will also see the anonymous avatar if the first post in the topic is anonymous. This means that the topic that is made by a user can also be anonymous. Automated tests: The automated tests can be found at the end of the test/posts.js file. The tests are testing the isAnonymous and anonymous fields added to the database. Specifically, it is testing these conditions: The condition where isAnonymous is set to false, should create a Post and change the anonymous boolean to false. And the condition where isAnonymous is set to true, should create Post and change the anonymous boolean to True. The tests are sufficient as they cover every possibility of the anonymous post feature.
Search Feature How to use the search feature: As a user, you will be able to search through posts of any topic inside one of the four categories (Announcements, General Discussion, Comments & Feedback, and Blogs). Unlike the user search functionality, users can search through posts even if they are not logged in with an account, which can help students who have not gotten the chance to register but need to search through posts for course material and finding answers. Users can click on one of the four categories, click any topic inside the category, and be faced with a small search bar on top of all of the posts of that topic. Entering a word or part of a word, with lowercase or uppercase letters, returns the posts with that search query. However, the functionality is still a step away from user-friendly functionality, therefore users have to use browser developer tools and click on “inspect”, then the console, then the “render search results” drop down to view the list of returned posts of the search query. If the user searches for a term that is not included in the posts, the response “No results found” will be displayed in the front-end. Automated tests: The automated tests can be found at the end of the test/topics.js file. The tests are testing the back-end function Topics.postSearch, specifically testing these conditions: returning all posts matching user query, returning all posts if user query is empty, returning search query that isn’t a full word, and returning posts case-insensitively. The tests are sufficient as they cover every condition of searching as well as specific conditions like case-insensitivity.
Best Response Feature How to use the Best Response feature: As an admin, you would like to be able to mark a response to a topic as the best response. This is strictly a feature for admins, and is thus under the topic tools on each topic. Click on “Mark as Best Response” in the dropdown and select one post before clicking on “Mark”. This will mark the post as the best response. To see this change, you must refresh the page. If you click on a link to a topic, you must refresh the page at least once to see if there is currently a post marked as the best response.