Files
hr-portal/app/test-manifest.json
TenX PM 87e9346d62 feat: complete HR portal full-stack application
- NestJS backend with 11 modules: Auth, Employees, Departments, Attendance, Leaves, Payroll, Reimbursements, Announcements, Tax, Reports, Admin
- JWT authentication with refresh tokens, role-based access (employee/hr_admin/super_admin)
- MongoDB schemas with Mongoose for all entities
- PDF payslip generation with pdfkit
- OpenTelemetry tracing to SigNoz
- Automatic database seeding on first startup
- Next.js 14 frontend with App Router, Tailwind CSS
- 25 pages covering all employee, HR admin, and super admin workflows
- Multi-stage Dockerfile with nginx proxy
- test-manifest.json for E2E testing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 19:32:52 +00:00

202 lines
6.2 KiB
JSON

{
"baseUrl": "http://localhost:80",
"credentials": {
"superAdmin": { "employeeId": "ADMIN001", "password": "Admin@123" },
"hrAdmin": { "employeeId": "HR001", "password": "Hr@12345" },
"employee": { "employeeId": "EMP001", "password": "Emp@12345" }
},
"routes": [
{
"path": "/login",
"description": "Login page",
"selectors": {
"employeeIdInput": "[data-testid='employee-id-input']",
"passwordInput": "[data-testid='password-input']",
"submitBtn": "[data-testid='login-submit']"
}
},
{
"path": "/dashboard",
"role": "employee",
"description": "Employee dashboard",
"selectors": {
"leaveBalanceCard": "[data-testid='leave-balance-card']",
"attendanceCard": "[data-testid='attendance-card']"
}
},
{
"path": "/attendance",
"role": "employee",
"description": "Employee attendance page"
},
{
"path": "/leave",
"role": "employee",
"description": "Employee leave management",
"selectors": {
"applyLeaveBtn": "[data-testid='apply-leave-btn']"
}
},
{
"path": "/payslips",
"role": "employee",
"description": "Employee payslips"
},
{
"path": "/reimbursements",
"role": "employee",
"description": "Employee reimbursements"
},
{
"path": "/tax",
"role": "employee",
"description": "Tax declarations and TDS projection"
},
{
"path": "/announcements",
"role": "employee",
"description": "Company announcements"
},
{
"path": "/admin/dashboard",
"role": "hr_admin",
"description": "HR Admin dashboard",
"selectors": {
"headcountCard": "[data-testid='headcount-card']",
"pendingApprovalsTable": "[data-testid='pending-approvals']"
}
},
{
"path": "/admin/employees",
"role": "hr_admin",
"description": "Employee management"
},
{
"path": "/admin/leaves",
"role": "hr_admin",
"description": "Leave approvals"
},
{
"path": "/admin/payroll",
"role": "hr_admin",
"description": "Payroll management"
},
{
"path": "/admin/reimbursements",
"role": "hr_admin",
"description": "Reimbursement approvals"
},
{
"path": "/admin/reports",
"role": "hr_admin",
"description": "HR reports"
},
{
"path": "/superadmin/dashboard",
"role": "super_admin",
"description": "Super Admin dashboard"
},
{
"path": "/superadmin/accounts",
"role": "super_admin",
"description": "Admin account management"
},
{
"path": "/superadmin/settings",
"role": "super_admin",
"description": "Organization settings"
},
{
"path": "/superadmin/audit-log",
"role": "super_admin",
"description": "Audit logs"
}
],
"apiEndpoints": [
{ "method": "POST", "path": "/api/v1/auth/login", "description": "Login with employee credentials" },
{ "method": "GET", "path": "/api/v1/employees", "description": "List employees (HR Admin+)" },
{ "method": "POST", "path": "/api/v1/employees", "description": "Create employee (HR Admin+)" },
{ "method": "GET", "path": "/api/v1/departments", "description": "List departments" },
{ "method": "POST", "path": "/api/v1/attendance", "description": "Mark attendance" },
{ "method": "GET", "path": "/api/v1/attendance", "description": "Get attendance records" },
{ "method": "POST", "path": "/api/v1/leaves", "description": "Apply for leave" },
{ "method": "GET", "path": "/api/v1/leaves", "description": "List leaves" },
{ "method": "PUT", "path": "/api/v1/leaves/:id/approve", "description": "Approve leave (HR Admin+)" },
{ "method": "PUT", "path": "/api/v1/leaves/:id/reject", "description": "Reject leave (HR Admin+)" },
{ "method": "POST", "path": "/api/v1/payroll/generate", "description": "Generate payroll (HR Admin+)" },
{ "method": "GET", "path": "/api/v1/payslips", "description": "List payslips" },
{ "method": "GET", "path": "/api/v1/payslips/:id/pdf", "description": "Download payslip PDF" },
{ "method": "POST", "path": "/api/v1/reimbursements", "description": "Submit reimbursement" },
{ "method": "GET", "path": "/api/v1/announcements", "description": "List announcements" },
{ "method": "GET", "path": "/api/v1/reports/headcount", "description": "Headcount report (HR Admin+)" }
],
"userFlows": [
{
"name": "employee-login",
"steps": [
"navigate to /login",
"fill employeeId with EMP001",
"fill password with Emp@12345",
"click login-submit",
"expect redirect to /dashboard",
"expect leave-balance-card to be visible"
]
},
{
"name": "hr-admin-login",
"steps": [
"navigate to /login",
"fill employeeId with HR001",
"fill password with Hr@12345",
"click login-submit",
"expect redirect to /admin/dashboard",
"expect headcount-card to be visible"
]
},
{
"name": "apply-leave",
"steps": [
"login as employee (EMP001)",
"navigate to /leave",
"click apply-leave-btn",
"select leave type casual",
"fill fromDate with future date",
"fill toDate with future date",
"fill reason with Personal work",
"submit form",
"expect success notification",
"expect leave in history table with pending status"
]
},
{
"name": "mark-attendance",
"steps": [
"login as employee (EMP001)",
"navigate to /attendance",
"if not marked today, click Mark Present",
"expect today's cell to be green"
]
},
{
"name": "approve-leave",
"steps": [
"login as HR Admin (HR001)",
"navigate to /admin/leaves",
"click Approve on a pending leave",
"expect leave status to change to approved"
]
},
{
"name": "generate-payroll",
"steps": [
"login as HR Admin (HR001)",
"navigate to /admin/payroll",
"select month and year",
"click Generate Payroll",
"expect payroll run to appear in list",
"click on payroll run to view payslips"
]
}
]
}