Update My Profile As Doctor:
_As an authenticated doctor, I want to update my specialty or contact information, so that patients have my up-to-date information.
Feature (Gherkin)
Feature: Update my profile
Background:
Given I am an authenticated doctor
And I am on the doctor dashboard
And I click the "Profile" button
And the "Update Profile" form opens
Scenario: View update profile form
Then the form should be prefilled with my current information
And the name field should be disabled
And the password field should not be displayed
Scenario: Successfully update doctor information
When I modify my specialty or contact information
And I click the "Update" button
Then my information should be updated
And I should see a "Profile updated" message
And I should be redirected to the doctor dashboard
And I should see my updated information
Scenario: Update doctor information with a duplicate email
When I enter a duplicate email
And I click the "Update" button
Then I should remain on the "Update Profile" form
And I should see the corresponding validation error message
Scenario: Update doctor information with invalid data
When I enter invalid information
And I click the "Update" button
Then I should remain on the "Update Profile" form
And I should see the corresponding validation error messages
Acceptance Criteria:
- When viewing the Update Profile form
- The form should be prefilled with the doctor's current information.
- The name field should be disabled.
- The password field should not be displayed.
- After successfully updating a profile
- The changes made must be persisted in the database.
- The "Update Profile" form should close automatically.
- The user should see a "Profile updated" message.
- The user should be redirected to the doctor dashboard.
- The updated information should be displayed.
- When trying to update the information of a doctor with a duplicate email
- The doctor's information in the database must not change.
- I should remain on the "Update Profile" form
- I should see the proper error message
- When trying to update the information of a doctor with invalid data
- The doctor's information in the database must not change.
- I should remain on the "Update Profile" form
- I should see the proper error messages
- A doctor must only be able to update their own profile information.
Priority: Medium
Story Points: 3
Notes:
- The email address must be unique among doctors.
- Validations must be enforced at the backend
Update My Profile As Doctor:
_As an authenticated doctor, I want to update my specialty or contact information, so that patients have my up-to-date information.
Feature (Gherkin)
Acceptance Criteria:
Priority: Medium
Story Points: 3
Notes: