Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US2 - Automated tests #46

Merged
merged 2 commits into from
Oct 3, 2024
Merged

US2 - Automated tests #46

merged 2 commits into from
Oct 3, 2024

Conversation

shantinghou
Copy link

@shantinghou shantinghou commented Oct 2, 2024

What

Added unit tests in tests/topics.json, lines 80-107

Test Scenarios:

A test case was added to check that when the anonymous checkbox is not selected during topic creation, the isAnonymous field is set to false by default in the topic object. This verifies that the system correctly assumes that posts are not anonymous unless explicitly specified by the user. Another test was added to simulate the scenario where the user selects the anonymous checkbox during topic creation. This ensures that the isAnonymous field is correctly set to true in the back end when the post is created.

Why

Complete issue 4 for user story 2. Ensure that the implementation for an anonymous checkbox is correctly implemented and works as expected

How

Changes were made in tests/topics.json file. A test topic was made to test these changes.
The back-end tests were implemented to verify that the isAnonymous field in the topic creation process behaves as expected.

Test Scenarios:

  • Default Behavior: A test case was added to check that when the anonymous checkbox is not selected during topic creation, the isAnonymous field is set to false by default in the topic object. This verifies that the system correctly assumes that posts are not anonymous unless explicitly specified by the user.
  • Checkbox Selected: Another test was added to simulate the scenario where the user selects the anonymous checkbox during topic creation. This ensures that the isAnonymous field is correctly set to true in the back end when the post is created.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11163111321

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.008%) to 82.687%

Files with Coverage Reduction New Missed Lines %
src/meta/errors.js 1 83.72%
Totals Coverage Status
Change from base Build 11016984283: 0.008%
Covered Lines: 22338
Relevant Lines: 25596

💛 - Coveralls

@guanjiecheng guanjiecheng merged commit 051634b into f24 Oct 3, 2024
1 check passed
@shantinghou shantinghou self-assigned this Oct 6, 2024
@shantinghou shantinghou added the testing improving code coverage label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anonymous testing improving code coverage
Projects
None yet
4 participants