Skip to content

test: API Testing: Mentor Registration & Approval Flow #490

@nora-weisser

Description

@nora-weisser

Description

We would like to add API test coverage for the Mentor Registration & Approval Flow using Bruno.
This issue focuses on validating mentor lifecycle scenarios, including approval, rejection, and duplicate registration handling.

The goal is to ensure API correctness, proper status transitions, validations, and notifications.

Scope of Testing

Mentor Registration & Approval

Flow

  1. New mentor submits a valid profile

    • Endpoint: POST /mentors
    • Payload: complete profile, bio, skills, focus areas, availability
    • Expected status: PENDING
  2. Mentorship Team approves mentor (ENDPOINT IS MISSING) feat: Missing POST/PUT endpoints to accept and decline mentor and mentee by mentorship team after registration #488

    • Endpoint: PATCH /mentors/{mentorId}/approve
    • Expected status: ACTIVE

Expected Results

  • POST /mentors returns 201 Created
  • Mentor is stored in DB with status = PENDING
  • Approval request updates mentor status to ACTIVE
  • Mentor becomes visible on the platform
  • Approval email notification is sent

Mentor Registration & Rejection

Flow

  1. New mentor submits a valid profile

    • Endpoint: POST /mentors
    • Expected status: PENDING
  2. Mentorship Team rejects mentor (ENDPOINT IS MISSING) feat: Missing POST/PUT endpoints to accept and decline mentor and mentee by mentorship team after registration #488

    • Endpoint: POST /mentors/{mentorId}/reject
    • Expected status: REJECTED

Expected Results

  • Mentor status updated to REJECTED
  • Rejection feedback is stored
  • Rejection email notification is sent

Duplicate Mentor Registration

Flow

  1. New mentor submits a valid profile

    • Endpoint: POST /mentors
    • Expected status: PENDING
  2. Duplicate registration attempt

    • Endpoint: POST /mentors
    • Payload: same email

Expected Results

  • API rejects duplicate registration
  • Appropriate error response - TBD
  • Clear error message returned

Testing Requirements

  • Create a Bruno collection covering all flows above
  • Implement assertions for:
    • HTTP status codes
    • Response body fields
    • Mentor status transitions
    • Error responses for duplicate registration

Deliverables

  • Bruno collection committed to the repository
  • Assertions implemented for all scenarios
  • Test execution HTML report
  • Screenshots or generated report files attached to this issue
  • Any discovered bugs clearly reported (with reproduction steps)

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic-mentorshipAll tasks related to mentorship pages & tasksepic-qaTest Automations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions