Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-019

Test Case Name

Verify that the admin can add a new user

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • The admin is on the Dashboard page

Test Steps & Expected Results

Step Action Expected Result
Step 1 Click on the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Click on the "Add User" button. The "Add User" form is displayed.
Step 3 Select a user role from the "User Role" dropdown.
Input: ESS
User role is selected and visible.
Step 4 Input the employee's name in the "Employee Name" field.
Input: John Smith
Employee name is entered and visible.
Step 5 Select the status from the "Status" dropdown.
Input: Enabled
Status is selected and visible.
Step 6 Input a valid username in the "Username" field.
Input: newuser
Username is entered and visible.
Step 7 Input a valid password in the "Password" field.
Input: Admin123!
Password is entered, visible, and covered in dots.
Step 8 Confirm the password in the "Confirm Password" field.
Input: Admin123!
Password confirmation is entered and visible.
Step 9 Click on the "Save" button. A success message is displayed, indicating the user has been added. The new user appears in the user list.

Post-Conditions

  • The new user is added successfully and visible in the users list.
  • The admin can log out and the new user can log in with their credentials.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-020

Test Case Name

Verify that a new user record is added successfully and reflected in the total user count

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials).
  • The admin is on the Admin Management page.

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Check and note the current number of user records displayed in the table. The total number of records is visible and noted.
Step 3 Click on the "Add User" button. The "Add User" form is displayed.
Step 4 Select a user role from the "User Role" dropdown.
Input: ESS
User role is selected and visible.
Step 5 Input the employee's name in the "Employee Name" field.
Input: John Smith
Employee name is entered and visible.
Step 6 Select the status from the "Status" dropdown.
Input: Enabled
Status is selected and visible.
Step 7 Input a valid username in the "Username" field.
Input: newuser
Username is entered and visible.
Step 8 Input a valid password in the "Password" field.
Input: Admin123!
Password is entered, masked with dots, and accepted.
Step 9 Confirm the password in the "Confirm Password" field.
Input: Admin123!
Password confirmation matches and is accepted.
Step 10 Click on the "Save" button. A success message confirming the user addition is displayed, and the user is redirected to the Admin Management page.
Step 11 Check the total number of user records displayed. The total number of user records is increased by 1 compared to the count noted in Step 2.

Post-Conditions

  • The new user is successfully created in the system.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-021

Test Case Name

Verify that the admin can edit an existing user's details

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • The admin is on the Dashboard page
  • The user to be edited exists in the system

Test Steps & Expected Results

Step Action Expected Result
Step 1 Click on the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Locate the user to edit from the user list. The user is visible in the list and selectable.
Step 3 Click on the "Edit" icon/button next to the user's name. The Edit User form is displayed, populated with current user details.
Step 4 Modify the user's details (e.g., username, role, status, password). The updated details are entered and visible in the form fields.
Step 5 Click the "Save" button to apply changes. A success message is displayed, indicating that the user's details have been updated.
Step 6 Verify the user list to ensure the changes are reflected. The updated user details are successfully reflected in the user list and persist after page refresh.

Post-Conditions

  • The user’s updated details are saved and persist in the system.
  • The user can log in with the updated credentials (if username or password was changed).
  • The admin remains logged in and can continue managing other users.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-022

Test Case Name

Verify that the admin can delete an existing user

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • The admin is on the Dashboard page

Test Steps & Expected Results

Step Action Expected Result
Step 1 Click on the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Locate the user to delete from the user list. The user is visible in the list and selectable.
Step 3 Click on the "Delete" icon/button next to the user's name. A confirmation dialog/modal is displayed, asking for deletion confirmation.
Step 4 Confirm the deletion by clicking "Yes" or "Confirm" in the dialog. The user is deleted from the system, and a success message is displayed.
Step 5 Refresh the user list or verify the user no longer appears. The deleted user no longer appears in the users list.
The total number of records decreases by 1.

Post-Conditions

  • The deleted user cannot log in to the system.
  • The admin remains logged in and can continue managing other users.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-023

Test Case Name

Verify that the admin can delete multiple users

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • The admin is on the Dashboard page

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Check the user records under "Records Found" on the Admin page. A list of user records is displayed.
Step 3 Select the checkboxes next to 2–4 users from the list. The selected users are checked, and the "Delete Selected" button appears above the user list.
Step 4 Click on the "Delete Selected" button. The selected users are deleted successfully. A confirmation message is displayed, and the selected user records are removed from the list.
Step 5 Verify that the number of user records has decreased by the number of deleted users after the deletion. The selected users are no longer listed, the success message is displayed, and the total number of user records is reduced accordingly.

Post-Conditions

  • The deleted users cannot log in to the system.
  • The admin remains logged in and can continue managing other users.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-024

Test Case Name

Verify that the admin cannot add a user with an invalid username

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • The admin is on the Dashboard page

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Click the "Add" button to open the "Add User" page. The "Add User" page is displayed.
Step 3 Select a valid "User Role" and "Employee Name", then enter an invalid username in the "Username" field.
Input: Admini
An error message is displayed next to the "Username" field indicating that the username is invalid.
Step 4 Fill in the "Password" and "Confirm Password" fields with valid and matching values. The password is entered correctly, and it matches the confirm password field.
Step 5 Click the "Save" button. The user cannot be added, and the page remains on the "Add User" form.

Post-Conditions

  • No new user is created in the system.
  • The admin remains on the "Add User" page for correction.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-025

Test Case Name

Verify that the system prevents adding a user with a duplicate username

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • At least one user exists

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Click the "Add" button to open the "Add User" page. The "Add User" page is displayed.
Step 3 Select a valid "User Role" and "Employee Name", Enter an existing username in the "Username" field.
Input: Admin
Error message is displayed: “Username already exists” and user is not added.
Step 4 Fill in the "Password" and "Confirm Password" fields with valid and matching values. The password is entered correctly, and it matches the confirm password field.
Step 5 Click the "Save" button. The user cannot be added, and the page remains on the "Add User" form.

Post-Conditions

  • No new user is created in the system.
  • The admin remains on the "Add User" page for correction.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-026

Test Case Name

Verify that the system prevents saving a user when passwords do not match

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • At least one user exists

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Click the "Add" button to open the "Add User" page. The "Add User" page is displayed.
Step 3 Select a valid "User Role" from the dropdown.
Input: ESS
User role is selected and visible.
Step 4 Input an employee name in the "Employee Name" field.
Input: John Smith
Employee name is entered and visible.
Step 5 Select status from the "Status" dropdown.
Input: Enabled
Status is selected and visible.
Step 6 Input a valid username in the "Username" field.
Input: testuser123
Username is entered and visible.
Step 7 Input a valid password in the "Password" field.
Input: Admin123!
Password is entered and masked with dots.
Step 8 Input a different password in the "Confirm Password" field.
Input: Admin456!
Password is entered and masked with dots.
An error message is displayed: "Passwords do not match". The user is not saved to the system.

Post-Conditions

  • No new user is created in the system.
  • The form fields retain the previously entered values (except passwords which may be cleared).
  • The admin remains on the "Add User" page for correction.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-027

Test Case Name

Verify that the admin cannot add a user without providing required fields

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials)
  • The admin is on the Dashboard page

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin Management page is displayed.
Step 2 Click the "Add" button to open the "Add User" page. The "Add User" page is displayed.
Step 3 Leave all required fields (User Role, Employee Name, Username, Password, Confirm Password) empty. All fields remain empty.
Step 4 Click the "Save" button. Error messages appear next to each required field indicating that they are required. The user cannot be added.

Post-Conditions

  • No new user is created in the system.
  • The admin remains on the "Add User" page to fill in the missing required fields.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-028

Test Case Name

Verify that the admin can search for users by their username

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials).
  • At least one user with a known username exists in the system.

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin management page is displayed.
Step 2 In the "Username" search field, input a valid username.
Input: Admin
The username is entered and visible in the search field.
Step 3 Click the "Search" button. The search results are displayed, showing the user with the matching username.

Post-Conditions

  • The admin can view the searched user's details in the results table.
  • The search results can be reset using the "Reset" button.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-029

Test Case Name

Verify that the admin can search for users by their User Role

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials).
  • At least one user with the selected User Role exists in the system.
  • The admin is on the Admin Management page.

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin management page is displayed.
Step 2 In the "User Role" dropdown, select a specific role to search for.
Input: ESS
The selected role is visible in the "User Role" field.
Step 3 Click the "Search" button. The search results are displayed, showing only users with the selected User Role.

Post-Conditions

  • The admin can view users filtered by the selected User Role.
  • The admin can reset the filter to view all users again.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-030

Test Case Name

Verify that the admin can search for users by their Status

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials).
  • At least one user with the selected Status exists in the system.
  • The admin is on the Admin Management page.

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin management page is displayed.
Step 2 In the "Status" dropdown, select a specific status to search for.
Input: Enabled
The selected status is visible in the "Status" field.
Step 3 Click the "Search" button. The search results are displayed, showing only users with the selected status.

Post-Conditions

  • The admin can view users filtered by the selected Status.
  • The admin can reset the filter to view all users again.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-031

Test Case Name

Verify that the admin can reset user passwords

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials).
  • At least one user exists in the system with a valid account.

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin management page is displayed.
Step 2 In the "Username" search field, input the username of the user whose password you want to reset.
Input: Admin
The username is entered and visible in the search field.
Step 3 Click the "Search" button. The search results are displayed, showing the user with the matching username.
Step 4 Click the "Edit" (pencil) icon next to the user you want to reset the password for. The Edit User page is displayed.
Step 5 Check the checkbox right below "Change Password?". The checkbox is selected, and the "Password" and "Confirm Password" fields become visible.
Step 6 Enter a new password in the "Password" field.
Input: NewPass123!
The password is entered, visible, and meets the system's criteria.
Step 7 Re-enter the new password in the "Confirm Password" field.
Input: NewPass123!
The password is entered and matches the first password field.
Step 8 Click the "Save" button. The user's password is successfully reset, and a confirmation message is displayed.

Post-Conditions

  • The user can log in using the new password.
  • The admin remains logged in and can manage other users.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-032

Test Case Name

Verify that the admin can enable/disable a user account

Pre-Conditions

  • The admin must be logged in (refer to TC-001 for valid login credentials).
  • At least one user exists in the system.

Test Steps & Expected Results

Step Action Expected Result
Step 1 Select the "Admin" option from the left sidebar. The Admin management page is displayed.
Step 2 In the "Username" search field, input the username of the user whose account you want to enable/disable.
Input: Admin
The username is entered and visible in the search field.
Step 3 Click the "Search" button. The search results are displayed, showing the user with the matching username.
Step 4 Click the "Edit" (pencil) icon next to the user whose account status you want to change. The Edit User page is displayed.
Step 5 In the "Status" dropdown, select "Enabled" to activate or "Disabled" to deactivate the user account. The status is updated to either "Enabled" or "Disabled" as selected.
Step 6 Click the "Save" button. The user's account status is successfully updated, and a confirmation message is displayed.
Step 7 Verify the user's status by performing a search for the username again. The user's status appears as "Enabled" or "Disabled" based on the change.

Post-Conditions

  • The user's account status is updated in the system.
  • The admin remains logged in and can continue managing other users.

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-033

Test Case Name

Verify that the system enforces minimum length for username (5 characters)

Pre-Conditions

  • The admin must be logged in
  • The admin is on the "Add User" page

Test Steps & Expected Results

Step Action Expected Result
Step 1 Fill all required fields with valid data All fields are filled correctly
Step 2 Input username with 4 characters.
Input: user
Error message displayed: "Should be at least 5 characters"
Step 3 Click "Save" User is not saved, admin remains on "Add User" page

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-034

Test Case Name

Verify that the system enforces maximum length for username (40 characters)

Pre-Conditions

  • The admin must be logged in
  • The admin is on the "Add User" page
Step Action Expected Result
Step 1 Fill all required fields with valid data All fields are filled correctly
Step 2 Input username with 41 characters.
Input: thisusernameiswaytoolongandexceedsfortych
Error message displayed: "Should not exceed 40 characters"
Step 3 Click "Save" User is not saved, admin remains on "Add User" page

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-035

Test Case Name

Verify that the system enforces minimum length for password (7 characters)

Pre-Conditions

  • The admin must be logged in
  • The admin is on the "Add User" page
Step Action Expected Result
Step 1 Fill all required fields with valid data All fields are filled correctly
Step 2 Input password with 6 characters.
Input: Pass1!
Error message displayed: "Should have at least 7 characters"
Step 3 Confirm password.
Input: Pass1!
Password confirmation matches the password field
Step 4 Click "Save" User is not saved, admin remains on "Add User" page

Test Scenario for Admin Functionality

OrangeHRM Demo - Admin User Management

Test Case ID

TC-036

Test Case Name

Verify that the system enforces maximum length for password (64 characters)

Pre-Conditions

  • The admin must be logged in
  • The admin is on the "Add User" page
Step Action Expected Result
Step 1 Fill all required fields with valid data All fields are filled correctly
Step 2 Input password with 65 characters.
Input: ThisPasswordIsWayTooLongAndExceedsSixtyFourCharactersLimitSure1!
Error message displayed: "Should not exceed 64 characters"
Step 3 Confirm password.
Input: ThisPasswordIsWayTooLongAndExceedsSixtyFourCharactersLimitSure1!
Password confirmation matches the password field
Step 4 Click "Save" User is not saved, admin remains on "Add User" page