-
Notifications
You must be signed in to change notification settings - Fork 42
Description
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
-
New mentor submits a valid profile
- Endpoint:
POST /mentors - Payload: complete profile, bio, skills, focus areas, availability
- Expected status:
PENDING
- Endpoint:
-
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
- Endpoint:
Expected Results
POST /mentorsreturns 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
-
New mentor submits a valid profile
- Endpoint:
POST /mentors - Expected status:
PENDING
- Endpoint:
-
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
- Endpoint:
Expected Results
- Mentor status updated to
REJECTED - Rejection feedback is stored
- Rejection email notification is sent
Duplicate Mentor Registration
Flow
-
New mentor submits a valid profile
- Endpoint:
POST /mentors - Expected status:
PENDING
- Endpoint:
-
Duplicate registration attempt
- Endpoint:
POST /mentors - Payload: same email
- Endpoint:
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)