From 6455163380a6f3e5600dba9fa1f5762dee929d9a Mon Sep 17 00:00:00 2001 From: Mohamed Elzeni <111191918+mohamed-elzeni@users.noreply.github.com> Date: Wed, 16 Oct 2024 19:14:18 +0300 Subject: [PATCH 01/14] Create UserGuide.md --- UserGuide.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 UserGuide.md diff --git a/UserGuide.md b/UserGuide.md new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/UserGuide.md @@ -0,0 +1 @@ + From 5561621532d2f488dc5ff0998bc4efbb5033f211 Mon Sep 17 00:00:00 2001 From: Mohamed Elzeni <111191918+mohamed-elzeni@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:08:43 +0300 Subject: [PATCH 02/14] Add skeleton to UserGuide.md --- UserGuide.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/UserGuide.md b/UserGuide.md index 8b13789179..1b1775b211 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -1 +1,30 @@ +# User Guide +## Introduction +This guide provides an outline of how to use and user test the new features added to NodeBB by the Logic Lords team. It also includes a description of the added automated tests for these features and where to find them. + +--- + +## NodeBB Installation +To be able to use and user test the added features, you need a working installation of this version of NodeBB. + + +--- + +## How to Use The New Features + +### Posting Anonymously + +### Content Filtering + +### Bug Log + +--- + +## Automated Tests + +### Posting Anonymously + +### Content Filtering + +### Bug Log From 701efd309582b62cf577232a31a8a9be54eef529 Mon Sep 17 00:00:00 2001 From: tatougueye <141055942+tatougueye@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:42:22 +0300 Subject: [PATCH 03/14] Update UserGuide.md to add info about filtering tests --- UserGuide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/UserGuide.md b/UserGuide.md index 1b1775b211..afb30c828b 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -26,5 +26,6 @@ To be able to use and user test the added features, you need a working installat ### Posting Anonymously ### Content Filtering +These are tests for checking if it filters inappropriate words and provide warning messages to users. The tests have been included to the test/post.js file from line 448 to 478. The testcases covers the different cases possible: (1) the title of the post contains an inappropriate word, (2) the message itself contains an inappropriate word, (3) both the title and the message does not contain any inappropriate word. And it checks for all these conditions. Because all the cases are taken into account in the testcases, the tests are sufficient. ### Bug Log From 156551f1f4a246d1d48affe34ef705fdaf2e5c6f Mon Sep 17 00:00:00 2001 From: tatougueye <141055942+tatougueye@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:51:54 +0300 Subject: [PATCH 04/14] Updated UserGuide.md specifically content filtering explanation part --- UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UserGuide.md b/UserGuide.md index afb30c828b..1a692410d0 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -26,6 +26,6 @@ To be able to use and user test the added features, you need a working installat ### Posting Anonymously ### Content Filtering -These are tests for checking if it filters inappropriate words and provide warning messages to users. The tests have been included to the test/post.js file from line 448 to 478. The testcases covers the different cases possible: (1) the title of the post contains an inappropriate word, (2) the message itself contains an inappropriate word, (3) both the title and the message does not contain any inappropriate word. And it checks for all these conditions. Because all the cases are taken into account in the testcases, the tests are sufficient. +Content filtering functionality has been tested thoroughly, with test cases added to the test/post.js file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1)The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. ### Bug Log From 88c58ad11143374422f9e791f7c656c926c26173 Mon Sep 17 00:00:00 2001 From: aattiyah <129796398+aattiyah@users.noreply.github.com> Date: Fri, 18 Oct 2024 23:34:26 +0300 Subject: [PATCH 05/14] Update UserGuide.md to include information about the bug report feature --- UserGuide.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/UserGuide.md b/UserGuide.md index 1a692410d0..a797156635 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -17,7 +17,8 @@ To be able to use and user test the added features, you need a working installat ### Content Filtering -### Bug Log +### Bug Reporting and Bug Log +To use the bug reporting feature, users should navigate to the bug report form by clicking on the "Report Bug" button, which can be found on the left side bar and is visible on all pages (excluding the Admin page). After clicking on this button, users will be directed to a form which they will need to fill out with their name, email address, and a description of the bug they encountered. After filling out the form, users should click the "Submit" button to send their report. The form will validate the inputs to ensure all required fields are filled correctly, including a valid email address. --- @@ -28,4 +29,5 @@ To be able to use and user test the added features, you need a working installat ### Content Filtering Content filtering functionality has been tested thoroughly, with test cases added to the test/post.js file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1)The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. -### Bug Log +### Bug Reporting and Bug Log +As for the bug report form, it has been tested carfully to ensure its functionality is sucessfully implement by covering essential scenarios which can be found in the test/bug-report-form.js file. Test cases include: (1) The form fetches and logs data correctly upon submission, (2) The email field is validated for proper format, (3) The name field cannot be submitted if left empty, (4) The email field must not be empty, and (5) The bug description cannot be empty as well. Each test validates the form’s ability to handle these cases by checking that submission is prevented when necessary and appropriate error messages are displayed. The tests provide comprehensive coverage to validate the form’s functionality. From cb15d3930bd87462b91130318ebbe976970b78f2 Mon Sep 17 00:00:00 2001 From: aattiyah <129796398+aattiyah@users.noreply.github.com> Date: Sat, 19 Oct 2024 14:14:51 +0300 Subject: [PATCH 06/14] Added more info for NodeBB installation in UserGuide.md --- UserGuide.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UserGuide.md b/UserGuide.md index a797156635..5bf8543c67 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -6,7 +6,11 @@ This guide provides an outline of how to use and user test the new features adde --- ## NodeBB Installation -To be able to use and user test the added features, you need a working installation of this version of NodeBB. +NodeBB requires the following software to be installed: +- A version of Node.js at least 16 or greater (installation/upgrade instructions) +- MongoDB, version 3.6 or greater or Redis, version 2.8.9 or greater +- If you are using clustering you need Redis installed and configured. +- nginx, version 1.3.13 or greater (only if intending to use nginx to proxy requests to a NodeBB --- From 754b1ac0c89c9811a7c916c6fafe09c88a18b839 Mon Sep 17 00:00:00 2001 From: lhitmi <156205224+lhitmi@users.noreply.github.com> Date: Sun, 20 Oct 2024 01:55:43 +0300 Subject: [PATCH 07/14] Updated UserGuide.md to include discussion of tests in bug-log --- UserGuide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UserGuide.md b/UserGuide.md index 5bf8543c67..81b5b7f27e 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -35,3 +35,5 @@ Content filtering functionality has been tested thoroughly, with test cases adde ### Bug Reporting and Bug Log As for the bug report form, it has been tested carfully to ensure its functionality is sucessfully implement by covering essential scenarios which can be found in the test/bug-report-form.js file. Test cases include: (1) The form fetches and logs data correctly upon submission, (2) The email field is validated for proper format, (3) The name field cannot be submitted if left empty, (4) The email field must not be empty, and (5) The bug description cannot be empty as well. Each test validates the form’s ability to handle these cases by checking that submission is prevented when necessary and appropriate error messages are displayed. The tests provide comprehensive coverage to validate the form’s functionality. + +The bug log page has been tested thoroughly in the file test/bug-logs.js. Test cases include: (1) The fetchBugLogs function correctly fetches and displays bug logs from the API, (2) The submitBugReport function successfully submits a bug report when the description is provided, (3) The bug report description field is validated to ensure it is not empty before submission, (4) The bug logs container is properly emptied and updated with new logs upon fetching, and (5) Error handling is tested to ensure appropriate messages are displayed when fetching or submitting fails. Each test validates the module's ability to handle these cases by checking that the DOM is updated correctly and appropriate console messages are logged. The tests provide comprehensive coverage to validate the module's functionality. From 68151605b36b2ff8518732dae3b11a8ad55ff095 Mon Sep 17 00:00:00 2001 From: lhitmi <156205224+lhitmi@users.noreply.github.com> Date: Sun, 20 Oct 2024 13:04:44 +0300 Subject: [PATCH 08/14] Updated UserGuide.md to include discussion of manual testing --- UserGuide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/UserGuide.md b/UserGuide.md index 81b5b7f27e..bbbfba84be 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -37,3 +37,14 @@ Content filtering functionality has been tested thoroughly, with test cases adde As for the bug report form, it has been tested carfully to ensure its functionality is sucessfully implement by covering essential scenarios which can be found in the test/bug-report-form.js file. Test cases include: (1) The form fetches and logs data correctly upon submission, (2) The email field is validated for proper format, (3) The name field cannot be submitted if left empty, (4) The email field must not be empty, and (5) The bug description cannot be empty as well. Each test validates the form’s ability to handle these cases by checking that submission is prevented when necessary and appropriate error messages are displayed. The tests provide comprehensive coverage to validate the form’s functionality. The bug log page has been tested thoroughly in the file test/bug-logs.js. Test cases include: (1) The fetchBugLogs function correctly fetches and displays bug logs from the API, (2) The submitBugReport function successfully submits a bug report when the description is provided, (3) The bug report description field is validated to ensure it is not empty before submission, (4) The bug logs container is properly emptied and updated with new logs upon fetching, and (5) Error handling is tested to ensure appropriate messages are displayed when fetching or submitting fails. Each test validates the module's ability to handle these cases by checking that the DOM is updated correctly and appropriate console messages are logged. The tests provide comprehensive coverage to validate the module's functionality. + +in the case of this user story due to its incompletion this has resulted in manual testing to ensure seperate functionalities are working. We focused on validating key API operations: + +1. **GET Requests**: We manually tested the API's ability to fetch data using the browser's Console tab. By executing `fetch` commands, we verified that responses included the expected information such as user IDs, usernames, and login statuses, confirming that data retrieval worked correctly. + +2. **Form Submission**: We also monitored the Network tab to ensure that when we submitted forms, the correct data was sent to the API and appropriate responses were received. This step was crucial in validating the data submission flow. + +3. **Error Handling**: Tests included checking how the system reacted to failure scenarios, ensuring that appropriate error messages were displayed when fetching or submitting data failed. + +These tests helped us ensure the controller was handling data effectively. + From eb43a62e0721aa4c22ea4f59179c5a5d082ba64a Mon Sep 17 00:00:00 2001 From: akobaidan <156104108+akobaidan@users.noreply.github.com> Date: Sun, 20 Oct 2024 13:28:13 +0300 Subject: [PATCH 09/14] Updated UserGuide.md to describe admin dashboard bug-log button auto testing --- UserGuide.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UserGuide.md b/UserGuide.md index bbbfba84be..f7b7ecd75c 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -34,8 +34,11 @@ To use the bug reporting feature, users should navigate to the bug report form b Content filtering functionality has been tested thoroughly, with test cases added to the test/post.js file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1)The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. ### Bug Reporting and Bug Log + As for the bug report form, it has been tested carfully to ensure its functionality is sucessfully implement by covering essential scenarios which can be found in the test/bug-report-form.js file. Test cases include: (1) The form fetches and logs data correctly upon submission, (2) The email field is validated for proper format, (3) The name field cannot be submitted if left empty, (4) The email field must not be empty, and (5) The bug description cannot be empty as well. Each test validates the form’s ability to handle these cases by checking that submission is prevented when necessary and appropriate error messages are displayed. The tests provide comprehensive coverage to validate the form’s functionality. +The functionality of the Bug-Log button in the admin dashboard navigation has been tested by extending the existing test of 'should load admin dashboard'. The test checks for the loading of the route '/admin/dashboard/bug-logs', guranteeing that the button is in the navigation of the admin dashboard and loads the appropriate view file of a table that would record all reported bugs from the user bug report form (bug-logs.tpl). This contributes to ensure that the admin dashboard comprehensively loads all the correct pre-existing navigation features with the newly added functionality of showing bug-logs. + The bug log page has been tested thoroughly in the file test/bug-logs.js. Test cases include: (1) The fetchBugLogs function correctly fetches and displays bug logs from the API, (2) The submitBugReport function successfully submits a bug report when the description is provided, (3) The bug report description field is validated to ensure it is not empty before submission, (4) The bug logs container is properly emptied and updated with new logs upon fetching, and (5) Error handling is tested to ensure appropriate messages are displayed when fetching or submitting fails. Each test validates the module's ability to handle these cases by checking that the DOM is updated correctly and appropriate console messages are logged. The tests provide comprehensive coverage to validate the module's functionality. in the case of this user story due to its incompletion this has resulted in manual testing to ensure seperate functionalities are working. We focused on validating key API operations: From 8875fa7e707a991ede59f3c22dda719ee38b8e8b Mon Sep 17 00:00:00 2001 From: Mohamed Elzeni <111191918+mohamed-elzeni@users.noreply.github.com> Date: Sun, 20 Oct 2024 19:17:18 +0300 Subject: [PATCH 10/14] Update installation instructions in UserGuide.md --- UserGuide.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UserGuide.md b/UserGuide.md index f7b7ecd75c..5800d68078 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -12,6 +12,11 @@ NodeBB requires the following software to be installed: - If you are using clustering you need Redis installed and configured. - nginx, version 1.3.13 or greater (only if intending to use nginx to proxy requests to a NodeBB +Then, you can install NodeBB by following the below installation instructions based on your computer's operating system, but instead of cloning the class repository you should clone [this](https://github.com/CMU-17313Q/nodebb-f24-logic-lords) one: +- [Mac](https://cmu-17313q.github.io/projects/P1/installation/mac/) +- [Windows](https://cmu-17313q.github.io/projects/P1/installation/windows/) +- [Ubuntu (Linux)](https://cmu-17313q.github.io/projects/P1/installation/ubuntu/) + --- From dd175d8df2b6d897b87776e725dd04c298bf87f8 Mon Sep 17 00:00:00 2001 From: tatougueye <141055942+tatougueye@users.noreply.github.com> Date: Sun, 20 Oct 2024 19:41:21 +0300 Subject: [PATCH 11/14] added how to use content filtering feature to UserGuide.md --- UserGuide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/UserGuide.md b/UserGuide.md index 5800d68078..90757dd422 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -25,6 +25,7 @@ Then, you can install NodeBB by following the below installation instructions ba ### Posting Anonymously ### Content Filtering +To use content filtering, go to any of the four interaction pages in NodeBB: Announcements, General Discussion, Comments & Feedback, or Blogs. When creating a new topic, if your title or message contains any inappropriate words from our predefined list (e.g., 'stupid' or 'dammit'), a warning message will appear, stating: "Your title/message contains inappropriate words, please update it accordingly." You will not be able to submit your message until the inappropriate words are removed. Similarly, if you reply to a post with inappropriate words in your message, a warning message will appear, and you will be unable to send your reply until it is corrected. ### Bug Reporting and Bug Log To use the bug reporting feature, users should navigate to the bug report form by clicking on the "Report Bug" button, which can be found on the left side bar and is visible on all pages (excluding the Admin page). After clicking on this button, users will be directed to a form which they will need to fill out with their name, email address, and a description of the bug they encountered. After filling out the form, users should click the "Submit" button to send their report. The form will validate the inputs to ensure all required fields are filled correctly, including a valid email address. From ba138e8f4657ad08f05d39e7292d4be8ec0ac6aa Mon Sep 17 00:00:00 2001 From: Mohamed Elzeni <111191918+mohamed-elzeni@users.noreply.github.com> Date: Sun, 20 Oct 2024 21:25:46 +0300 Subject: [PATCH 12/14] Update UserGuide.md with sections for posting anonymously --- UserGuide.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UserGuide.md b/UserGuide.md index 90757dd422..78a6eb7a77 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -17,24 +17,25 @@ Then, you can install NodeBB by following the below installation instructions ba - [Windows](https://cmu-17313q.github.io/projects/P1/installation/windows/) - [Ubuntu (Linux)](https://cmu-17313q.github.io/projects/P1/installation/ubuntu/) - --- ## How to Use The New Features ### Posting Anonymously +To make an anonymous post, navigate to any of the four interaction pages in NodeBB: _Announcements_, _General Discussion_, _Comments & Feedback_, or _Blogs_. Click on `New Topic`. A small pop-up window should appear where you can fill in the details of your new topic. Fill in at least a long enough title and post content. Then, you should see a blue `Submit` button on the top-right of pop-up window, with an arrow pointing down. Click the arrow, and a drop down menu should show. Click the second option in the menu: `Submit Anonymously`. Your post will be published without associating it with your user ID. ### Content Filtering -To use content filtering, go to any of the four interaction pages in NodeBB: Announcements, General Discussion, Comments & Feedback, or Blogs. When creating a new topic, if your title or message contains any inappropriate words from our predefined list (e.g., 'stupid' or 'dammit'), a warning message will appear, stating: "Your title/message contains inappropriate words, please update it accordingly." You will not be able to submit your message until the inappropriate words are removed. Similarly, if you reply to a post with inappropriate words in your message, a warning message will appear, and you will be unable to send your reply until it is corrected. +To use content filtering, go to any of the four interaction pages in NodeBB: _Announcements_, _General Discussion_, _Comments & Feedback_, or _Blogs_. When creating a new topic, if your title or message contains any inappropriate words from our predefined list (e.g., 'verybadword', which we added so that you don't have to use actual inappropriate words), a warning message will appear, stating: "Your title/message contains inappropriate words, please update it accordingly." You will not be able to submit your message until the inappropriate words are removed. Similarly, if you reply to a post with inappropriate words in your message, a warning message will appear, and you will be unable to send your reply until it is corrected. ### Bug Reporting and Bug Log -To use the bug reporting feature, users should navigate to the bug report form by clicking on the "Report Bug" button, which can be found on the left side bar and is visible on all pages (excluding the Admin page). After clicking on this button, users will be directed to a form which they will need to fill out with their name, email address, and a description of the bug they encountered. After filling out the form, users should click the "Submit" button to send their report. The form will validate the inputs to ensure all required fields are filled correctly, including a valid email address. +To use the bug reporting feature, users should navigate to the bug report form by clicking on the `Report Bug` button, which can be found on the left side bar and is visible on all pages (excluding the Admin page). After clicking on this button, users will be directed to a form which they will need to fill out with their name, email address, and a description of the bug they encountered. After filling out the form, users should click the `Submit` button to send their report. The form will validate the inputs to ensure all required fields are filled correctly, including a valid email address. --- ## Automated Tests ### Posting Anonymously +The ability to post anonymously and hide your user ID has been tested by adding tests in both test/posts.js and test/topics.js for the cases where a post is created successfully when a isAnonymous attribute is added. In addition, the tests ensure that the uid of such created posts are 0, ensuring the anonymity of the author and that their uid was never saved in the database. And thus fully testing the correctness of the feature. ### Content Filtering Content filtering functionality has been tested thoroughly, with test cases added to the test/post.js file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1)The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. @@ -56,4 +57,3 @@ in the case of this user story due to its incompletion this has resulted in manu 3. **Error Handling**: Tests included checking how the system reacted to failure scenarios, ensuring that appropriate error messages were displayed when fetching or submitting data failed. These tests helped us ensure the controller was handling data effectively. - From 9037b297ec64f8724be76ffcd66ce71cb1970621 Mon Sep 17 00:00:00 2001 From: Mohamed Elzeni <111191918+mohamed-elzeni@users.noreply.github.com> Date: Sun, 20 Oct 2024 21:35:38 +0300 Subject: [PATCH 13/14] Minor update to UserGuide.md --- UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UserGuide.md b/UserGuide.md index 78a6eb7a77..1f96e9a9fa 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -38,7 +38,7 @@ To use the bug reporting feature, users should navigate to the bug report form b The ability to post anonymously and hide your user ID has been tested by adding tests in both test/posts.js and test/topics.js for the cases where a post is created successfully when a isAnonymous attribute is added. In addition, the tests ensure that the uid of such created posts are 0, ensuring the anonymity of the author and that their uid was never saved in the database. And thus fully testing the correctness of the feature. ### Content Filtering -Content filtering functionality has been tested thoroughly, with test cases added to the test/post.js file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1)The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. +Content filtering functionality has been tested thoroughly, with test cases added to the test/post.js file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1) The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. ### Bug Reporting and Bug Log From 922dd923230c6efc1a089059ac42574d521f9489 Mon Sep 17 00:00:00 2001 From: Mohamed Elzeni <111191918+mohamed-elzeni@users.noreply.github.com> Date: Sun, 20 Oct 2024 22:20:57 +0300 Subject: [PATCH 14/14] Add links to tests in UserGuide.md --- UserGuide.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UserGuide.md b/UserGuide.md index 1f96e9a9fa..a4d1260b13 100644 --- a/UserGuide.md +++ b/UserGuide.md @@ -35,18 +35,18 @@ To use the bug reporting feature, users should navigate to the bug report form b ## Automated Tests ### Posting Anonymously -The ability to post anonymously and hide your user ID has been tested by adding tests in both test/posts.js and test/topics.js for the cases where a post is created successfully when a isAnonymous attribute is added. In addition, the tests ensure that the uid of such created posts are 0, ensuring the anonymity of the author and that their uid was never saved in the database. And thus fully testing the correctness of the feature. +The ability to post anonymously and hide your user ID has been tested by adding tests in both [test/posts.js](https://github.com/CMU-17313Q/nodebb-f24-logic-lords/blob/f24/test/posts.js) and [test/topics.js](https://github.com/CMU-17313Q/nodebb-f24-logic-lords/blob/f24/test/topics.js) for the cases where a post is created successfully when a isAnonymous attribute is added. In addition, the tests ensure that the uid of such created posts are 0, ensuring the anonymity of the author and that their uid was never saved in the database. And thus fully testing the correctness of the feature. ### Content Filtering -Content filtering functionality has been tested thoroughly, with test cases added to the test/post.js file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1) The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. +Content filtering functionality has been tested thoroughly, with test cases added to the [test/posts.js](https://github.com/CMU-17313Q/nodebb-f24-logic-lords/blob/f24/test/posts.js) file from lines 448 to 478. These tests cover a variety of scenarios to ensure the system accurately detects inappropriate content: (1) The post's title contains inappropriate words, (2) The post's message contains inappropriate words, (3) Neither the title nor the message contains inappropriate words. Each test checks whether the system correctly identifies and handles these cases by displaying appropriate warning messages to users. Given that all possible scenarios are accounted for, the current set of test cases is comprehensive and sufficient to validate the content filtering mechanism. ### Bug Reporting and Bug Log -As for the bug report form, it has been tested carfully to ensure its functionality is sucessfully implement by covering essential scenarios which can be found in the test/bug-report-form.js file. Test cases include: (1) The form fetches and logs data correctly upon submission, (2) The email field is validated for proper format, (3) The name field cannot be submitted if left empty, (4) The email field must not be empty, and (5) The bug description cannot be empty as well. Each test validates the form’s ability to handle these cases by checking that submission is prevented when necessary and appropriate error messages are displayed. The tests provide comprehensive coverage to validate the form’s functionality. +As for the bug report form, it has been tested carfully to ensure its functionality is sucessfully implement by covering essential scenarios which can be found in the [test/bug-report-form.js](https://github.com/CMU-17313Q/nodebb-f24-logic-lords/blob/testing-bug-report-form/test/bug-report-form.js) file. Test cases include: (1) The form fetches and logs data correctly upon submission, (2) The email field is validated for proper format, (3) The name field cannot be submitted if left empty, (4) The email field must not be empty, and (5) The bug description cannot be empty as well. Each test validates the form’s ability to handle these cases by checking that submission is prevented when necessary and appropriate error messages are displayed. The tests provide comprehensive coverage to validate the form’s functionality. -The functionality of the Bug-Log button in the admin dashboard navigation has been tested by extending the existing test of 'should load admin dashboard'. The test checks for the loading of the route '/admin/dashboard/bug-logs', guranteeing that the button is in the navigation of the admin dashboard and loads the appropriate view file of a table that would record all reported bugs from the user bug report form (bug-logs.tpl). This contributes to ensure that the admin dashboard comprehensively loads all the correct pre-existing navigation features with the newly added functionality of showing bug-logs. +The functionality of the Bug-Log button in the admin dashboard navigation has been tested by extending the existing test of 'should load admin dashboard'. The test checks for the loading of the route `/admin/dashboard/bug-logs`, guranteeing that the button is in the navigation of the admin dashboard and loads the appropriate view file of a table that would record all reported bugs from the user bug report form (bug-logs.tpl). This contributes to ensure that the admin dashboard comprehensively loads all the correct pre-existing navigation features with the newly added functionality of showing bug-logs. -The bug log page has been tested thoroughly in the file test/bug-logs.js. Test cases include: (1) The fetchBugLogs function correctly fetches and displays bug logs from the API, (2) The submitBugReport function successfully submits a bug report when the description is provided, (3) The bug report description field is validated to ensure it is not empty before submission, (4) The bug logs container is properly emptied and updated with new logs upon fetching, and (5) Error handling is tested to ensure appropriate messages are displayed when fetching or submitting fails. Each test validates the module's ability to handle these cases by checking that the DOM is updated correctly and appropriate console messages are logged. The tests provide comprehensive coverage to validate the module's functionality. +The bug log page has been tested thoroughly in the file [test/bug-logs.js](https://github.com/CMU-17313Q/nodebb-f24-logic-lords/blob/testing/test/bug-logs.js). Test cases include: (1) The fetchBugLogs function correctly fetches and displays bug logs from the API, (2) The submitBugReport function successfully submits a bug report when the description is provided, (3) The bug report description field is validated to ensure it is not empty before submission, (4) The bug logs container is properly emptied and updated with new logs upon fetching, and (5) Error handling is tested to ensure appropriate messages are displayed when fetching or submitting fails. Each test validates the module's ability to handle these cases by checking that the DOM is updated correctly and appropriate console messages are logged. The tests provide comprehensive coverage to validate the module's functionality. in the case of this user story due to its incompletion this has resulted in manual testing to ensure seperate functionalities are working. We focused on validating key API operations: