Test Cases
Test Case 1.1: Display Account Information
Objective Ensure account information (ID, username, email) is correctly displayed to the user.
Test Steps
- Login as a valid user.
- Navigate to the account detail page.
- Verify visibility of
ID,Username, andEmail.
Expected Results
- All fields (
ID,Username,Email) are visible and non-editable by default.
Test Case 2.1: Edit Account Information
Objective Ensure the user can update their account information using the “Edit” button.
Test Steps
- Login and go to the account page.
- Click the “Edit” button.
- Enter the right password.
- Change the
UsernameorEmail. - Click “Save”.
- Reload the page to confirm changes persist.
Expected Results
- New values are saved and shown after reload.
- Success message is shown on update.
- The password works.
Test Case 2.2: Edit Account Information failure
Objective Ensure the password protection for editing user information works.
Test Steps
- Login and go to the account page.
- Click the “Edit” button.
- Enter a wrong password.
- Change the
UsernameorEmail. - Click “Save”.
- Reload the page to confirm changes did not happen.
Expected Results
- New values are not saved after reload.
- Error message is shown.
- The validation is working.
Test Case 3.1: Change Password
Objective Ensure that users can successfully change their password when all inputs are valid.
Test Steps
- Go to the account page.
- Click the “Change Password” button.
- Enter the correct
current password, a strongnew password, and match it inconfirm new password. - Submit the form.
Expected Results
- Password strength requirements are enforced.
- Success message is displayed.
- Login with the old password fails; new password succeeds.
Test Case 3.2: Change Password - Confirmation Field Mismatch
Objective Ensure the system detects when the new password and confirmation do not match.
Test Steps
- Go to the account page.
- Click the “Change Password” button.
- Enter the correct
current password, anew password, and a differentconfirm new password. - Submit the form.
Expected Results
- Password strength requirements are checked.
- Error message is shown due to mismatched confirmation.
- Password is not changed.
- Login with the old password still works.
Test Case 3.3: Change Password - Incorrect Current Password
Objective Ensure the system rejects password changes when the current password is incorrect.
Test Steps
- Go to the account page.
- Click the “Change Password” button.
- Enter an incorrect
current password, a validnew password, and matchingconfirm new password. - Submit the form.
Expected Results
- Password strength requirements are checked.
- Error message is displayed due to incorrect current password.
- Password is not changed.
- Login with the old password still works.
Test Case 4.1: Update Account Preferences Successfully
Objective Ensure user preferences can be updated and persist correctly across sessions.
Test Steps
- Navigate to the account preferences page.
- Change one or more settings (e.g., enable dark mode, change language to French).
- Click “Save Preferences”.
- Reload the page or log out and back in to confirm preferences are retained.
Expected Results
- Updated preferences are applied immediately.
- Changes persist across sessions and reloads.
- Valid values are accepted and saved successfully.
Test Case 4.2: Update Account Preferences with Empty Values
Objective Ensure the system does not accept empty or invalid preference inputs.
Test Steps
- Navigate to the account preferences page.
- Clear a required field or leave a preference setting empty.
- Click “Save Preferences”.
Expected Results
- System displays a validation error for empty or invalid input.
- Preferences are not saved.
- No changes are applied to user settings.
- Previously saved preferences remain unchanged.
Test Case 4.3: Update Only Non-Empty Preferences
Objective Ensure that only non-empty, valid preferences are updated and others remain unchanged.
Test Steps
- Navigate to the account preferences page.
- Change one preference (e.g., language), leave other fields empty or unchanged.
- Click “Save Preferences”.
- Reload and confirm that only the modified field was updated.
Expected Results
- Only the changed, valid preference is updated.
- Unchanged preferences retain their previous values.
- No validation errors occur for untouched or empty optional fields.
Test Case 5.1: Multi-Factor Authentication (MFA) Setup
Objective Verify MFA setup, toggling, and error handling.
Test Steps
- Go to the MFA settings page.
- Enable MFA (e.g., QR code + secret key).
- Enter the verification code.
- Confirm activation.
- Try login with and without MFA to validate flow.
Expected Results
- MFA is enabled with valid input.
- Incorrect codes are rejected.
- Login flow requires MFA if enabled.
- MFA can be disabled securely.
Test Case 6.1: 404 Error Page
Objective Ensure that invalid or unknown account URLs display a friendly 404 page.
Test Steps
- Visit a non-existent account page (
/account/unknown). - Wait for the response.
Expected Results
- A 404 error page is shown.
- User is offered navigation back to a safe page.
Test Case 7.1: Account Error Page
Objective Verify that errors (e.g., server-side issues) in the account module are handled with a proper error page.
Test Steps
- Simulate a backend error on the account page (e.g., by removing auth token).
- Reload the page.
Expected Results
- A dedicated error page is shown with messaging (e.g., “Account Error”).
- User is not left on a broken or blank screen.
- A retry or back-to-home option is provided.