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

Automated testing the bug report form functionalities (User Story 2) #43

Open
wants to merge 29 commits into
base: f24
Choose a base branch
from

Conversation

aattiyah
Copy link

@aattiyah aattiyah commented Oct 19, 2024

Created a test file to test the functionalities of the bug report form

The file test/bug-report-form.js tests how the bug report form should work in a variety of ways: (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.

This test the submission process of the form and the data collected of issue #17.

@aattiyah aattiyah added backend main code is written in backend Test This tests features that were implemented labels Oct 19, 2024
@aattiyah aattiyah added this to the Sprint 2 milestone Oct 19, 2024
@aattiyah aattiyah requested a review from lhitmi October 19, 2024 21:10
@aattiyah aattiyah changed the title Testing the bug report form functionalities (User Story 2) Automated testing the bug report form functionalities (User Story 2) Oct 19, 2024
@aattiyah aattiyah self-assigned this Oct 19, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11420953015

Details

  • 9 of 25 (36.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.05%) to 82.633%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/controllers/admin/dashboard.js 7 23 30.43%
Files with Coverage Reduction New Missed Lines %
src/meta/templates.js 3 84.54%
Totals Coverage Status
Change from base Build 11057241668: -0.05%
Covered Lines: 22358
Relevant Lines: 25639

💛 - Coveralls

@aattiyah aattiyah linked an issue Oct 20, 2024 that may be closed by this pull request
Copy link

@lhitmi lhitmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests look clear and cover all relevant functionalities!

Copy link

@akobaidan akobaidan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test file comprehensively covers the bug report form’s functionality and behavior.

The tests seem to address both data validation and error handling. The tests ensure that the code:

  • Correctly fetches and logs data prior to form submission.
  • The email field is validated based on proper format.
  • The required fields cannot be submitted if left empty.
  • Appropriate error messages are displayed when validation fails.

There seems to be no major concerns with regards to coverage and logic. This is definitely a result of the test cases being well-defined . Therefore, the code is ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend main code is written in backend Test This tests features that were implemented
Projects
None yet
4 participants