Add New Employee
1. Accessing the Form
- Given I am logged into the application with Admin privileges
- When I navigate to the Employee Master module
- Then I should see a blank form to enter details for a new "Employee" and a "View List" button at the top right to see existing records.
2. Auto-Generated & Default Fields
- Given I open a new Employee form
- Then the
Employee Codefield should be auto-populated with the next sequence (e.g., EMP0012) and act as read-only. - And the
Employee Statusshould default to "Active".
3. Mandatory Field Validation
- Given I am filling out the new employee form
- When I click the "Save" button without filling out the required fields
- Then the system should prevent submission and display validation errors for the following mandatory (*) fields:
- Employee Type
- Parent Party Type
- Parent Party Name
- Employee Title
- Employee Name
- Employee Mobile
- Employee DOJ (Date of Joining)
- Gender
- Workflow Department
- Select State
- Select City
4. Optional Fields Entry
- Given I am creating a new employee
- Then I should be able to optionally input data for the following fields to maintain a comprehensive profile:
- Employee Father Name
- Employee Email
- Manager (Dropdown selection)
- Employee DOB (Date of Birth)
- Employee DOL (Date of Leaving)
- Employee Anniversary Date
- Blood Group
- Designation
- HR Department
- Employee Address
- Company
- Remarks (Text Area)
5. Saving the Record
- Given I have filled in all required fields and any relevant optional fields with valid data
- When I click the "Save" button at the bottom of the form
- Then the system should save the new employee record to the database
- And display a success confirmation message (e.g., "Employee added successfully")
- And clear the form or redirect me to the Employee List view.