Sprint 2
Implementing backend and API for endorsements - Evelynn Chen
I was able to add a new boolean field called endorsed to the Posts schema. I changed it from a user ID in Sprint 1 to a boolean in order to simplify implementation. I had lots of trouble running the test suite reliably because sometimes an extended plugin I didn't interact with would fail a test…
Implementing backend and API for endorsements - Evelynn Chen
I was able to add a new boolean field called endorsed to the Posts schema. I changed it from a user ID in Sprint 1 to a boolean in order to simplify implementation. I had lots of trouble running the test suite reliably because sometimes an extended plugin I didn't interact with would fail a test, making me have to wait a couple hours to a day to actually run the tests I want to test. Once I added the field to Posts and verified it by seeing it via the localhost:4567/api/* view of the JSON, I implemented a simple API with no authorization for interacting with Post's endorsed field. I wrote automated tests to test that this API actually toggled the endorsed field. I was unable to get authorization implemented where it only allows a professor or TA to endorse a post. I tried adding privsPosts.canEndorse to privileges/posts.js, but could not get it to work and decided to let Vicky pick it up from here.
Debugging authentication for endorsement - Vicky Chen
I haven't been able to integrate the endorse feature with the front end yet, as there isn't a functional front end in place. While we managed to get parts of the endorsement functionality to work and pass, we encountered issues with authentication. Specifically, we couldn't resolve how to restrict endorsements and unendorsements to only professors and TAs. I took over the debugging process after Evelynn implemented the feature but couldn't fully identify the root cause of the issue.
During the debugging process, we discovered an undefined ID error (e.g., uid, cid, etc.), which seems to be the reason why the tests are failing and not behaving as expected. I've traced through all the relevant files, starting from the failing test case, and added print statements throughout, but all the IDs continue to return as undefined. This is likely the key issue preventing the tests from passing. I'm now suspecting if its not the code structure that's causing the undefined error but maybe the way we're running things.
Green indicator and conditional front end - Anna Shi
I worked on a couple different user stories as we kept reassigning tasks. I helped with trying to figure out the backend issues Evelynn and Alice were having where the field was not showing up and tested their branches on my local machine. I was able to identify the issue of the added topic fields not showing up in the json after reading through the documentation. After this, I went back to working on US3 with showing some green indicator on the posts. I started by trying to implement it in the topics but without the conditional since the backend still wasn't working from where Alice left off in Sprint 1. I also had some issues because my local instance of nodebb wasn't working so I wasn't able to see the changes to my front end.
Implementing Front-end Endorsement Button -- Cass Ma
I worked on implementing the front-end Endorsement feature and encountered various technical challenges along the way. Initially, I followed the quick-start-theme UI instructions and successfully added an item to a dropdown menu that displayed correctly. However, when I moved on to implementing the endorsement button, I faced a recurring issue where the theme folder would be automatically deleted after adding or pushing files. Switching to the front-end repository instructions led to further setup problems. After working with OH, we determined that the issue could only be resolved by repeatedly re-cloning the NodeBB files and resetting everything, though the root cause is still unclear. Eventually, I was able to get the endorsement button to appear on the front-end repository, but it still lacks integration with our main repository.
Implement back-end endorsed field -- Alice
I worked on the User story US3 and added a field so that when exporting the json file, it'll show up. I created a branch for that and it worked. I also wrote some test cases for Evelynn's feature. Specifically, I wrote test cases to see whether upon initialization, the field that Evelynn implemented will show up in Mocha. It is pretty interesting to see how test cases are set up in Mocha because it involves not only that component but several interactions from other files as well.