Skip to content

Conversation

@Jagaima
Copy link

@Jagaima Jagaima commented Oct 29, 2025

Description

This PR addresses the high priority testing for the Course Enroll Page by adding comprehensive MC/DC test coverage for the checkCompulsoryFields method.

Changes

  • Added 6 MC/DC test cases covering all decision paths in student enrollment validation
  • Method tested: checkCompulsoryFields with logic if ((A && B) || C || D || E) (based on page function sections)
  • Conditions covered:
    • A: 100+ students validation
    • B: Empty section validation
    • C: Empty team validation
    • D: Empty name validation
    • E: Empty email validation

Test Coverage

The tests ensure MC/DC coverage by proving each condition independently affects validation:

  1. Valid enrollment - All fields filled correctly
  2. Empty email - Tests mandatory email field
  3. Empty name - Tests mandatory name field
  4. Empty team - Tests mandatory team field
  5. Large class organized - 100+ students with sections
  6. Large class disorganized - 100+ students without sections

Verification

✅ All 6 tests pass successfully
✅ Increases test coverage from 0% to 100% MC/DC
✅ Addresses high priority testing for Course Enroll Page

This is Part of [#10920]

this is my first contribution to the project. Thanks for your time reviewing this PR and for any feedback.

@github-actions
Copy link

Hi @Jagaima, thank you for your interest in contributing to TEAMMATES!
However, your PR does not appear to follow our contribution guidelines:

  • Description must reference the issue number the PR is fixing, e.g. Fixes #<issue-number> (or Part of #<issue-number> if the PR does not address the issue fully)

Please address the above before we proceed to review your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant