CMU-313 / spring24-nodebb-apple

spring24-nodebb-apple created by GitHub Classroom
https://spring24-nodebb-apple-ibtybkwnba-uc.a.run.app/
GNU General Public License v3.0
0 stars 1 forks source link

US#3: implement front-end for endorse answers feature #41

Open takuel37 opened 6 months ago

takuel37 commented 6 months ago

Fixed US#3

I implemented the endorsement feature's front-end. Users are now able to endorse posts and it will have a tag when the page is refreshed. I could not implement the back-end so only instructors could do it. I struggled with the test cases.

Acceptance criteria: • Visual testing that clicking on the endorse button adds an endorse tag to the post and refreshes the page to display the tag • Visual testing to confirm that the endorse feature is only visible and usable when a user is logged in • Visual testing to ensure that the endorse button is not available to users except instructors, as back-end support for exclusive instructor endorsement was not implemented • Automated testing to verify that posts are correctly tagged as endorsed in the database or front-end storage after the endorse API call is made with a logged-in session • Automated testing to validate that the endorse feature does not proceed or alter post status when attempted without a logged-in session

Summary

Implemented the endorsement button feature for post frontend, allowing posts to be endorsed. Added endorsement tag visibility to posts upon endorsement. Established front-end event handling for endorsement button clicks. Added controller functions to manage endorsement status updates with proper permissions. Motivation The endorsement feature is inspired by the effectiveness of similar functionalities in educational platforms:

As a student, it allows me to highlight posts that are insightful or particularly helpful. As an instructor, it enables me to easily identify and endorse valuable contributions, enhancing the learning experience for everyone. Implementing this feature supports a more interactive and engaging forum environment, encouraging quality contributions and facilitating easier navigation through endorsed content. Changes Made

Introduced new endorsement functionality to enhance post interaction. Testing Done Visual Testing

Tested endorsing a post, verifying that the endorsement tag is correctly displayed upon page refresh. Tested with an unlogged user, confirming that the endorsement feature is not visible or usable without authentication. Logged in as an instructor, ensured that endorsement functionality is available and operates as expected. Automated Testing

Failed to do automated testing Next Steps

A valuable enhancement would be to introduce a filter mechanism in the forum to allow users to sort or view posts based on their endorsement status, further improving user experience and content discoverabili