1Business context
PeopleHub is an HR self-service portal for attendance and leave. Employees apply for leave within their balance; managers approve or reject. Working-day maths, overlap detection and role-based access are the key business rules.
Clock in with a live timer, apply for leave with weekend-aware day counts and half days, approve as the HR manager, watch the balance drop, browse a paginated directory and download payslips.
2Users & roles
- 👤 Employee (emp / Hr@123) — clocks in/out, applies for leave
- 👤 HR manager (hrmanager / Hr@123) — approves or rejects leave, browses the directory
3Modules & screens
| Screen | Route | What it does |
|---|---|---|
| Login | /apps/hr | Role-based sign-in |
| Dashboard | /apps/hr/dashboard | Leave balances and clock in/out |
| Apply leave | /apps/hr/leave/apply | Type, dates (weekends disabled), half-day, reason |
| My leaves | /apps/hr/leave | Requests with status and manager comments |
| Approvals | /apps/hr/approvals | Manager-only approve/reject |
| Directory | /apps/hr/directory | Department filter, paging, employee details |
4Main end-to-end journey
Leave request approved end to end
- Log in as emp / Hr@123 and clock in
- Apply a half-day casual leave with a reason
- Log out, log in as hrmanager / Hr@123 and approve it
- Log back in as emp
Expected: Status Approved and casual balance drops from 8 to 7.5
5Business rules & validations
- Role-based pagesBeginner
The employee sees access-denied on Approvals; the manager can't open Apply leave.
- Clock in/outBeginner
clock-in starts worked-time ticking; clock-out records last-session.
- Disabled weekendsIntermediate
Saturday/Sunday chips in leave-from/leave-to are disabled; leave-to before leave-from is disabled too.
- Working-day mathsIntermediate
A Fri → Mon range counts 2 days in leave-days; half-day (same day only) counts 0.5.
- Validation rulesIntermediate
Exceeding the balance, overlapping an existing request or a short reason each show error-*.
- Approval workflowAdvanced
Employee submits → manager approves → leave-status Approved and balance-* drops by leave-days.
- Reject with commentAdvanced
reject-leave requires a reason; the employee sees it under their request.
- Directory pagingBeginner
Filter by department, page with page-next, open an employee-modal and read employee-email.
6Test data & credentials
- URL
- /apps/hr
- Employee
- emp / Hr@123
- HR manager
- hrmanager / Hr@123
- Casual leave
- 8 days
7Glossary
- Casual leave
- Starts at 8 days per employee
- Working days
- Weekends are excluded — Fri → Mon counts 2 days
- Half-day
- Same-day leave counted as 0.5
8Watch-outs for automation
- ⚠️Two roles in one flow — log out between them
- ⚠️Pick enabled dates with :not([disabled])
- ⚠️Approvals reduce the employee's balance — verify after re-login
9Suggested test strategy
1 · Smoke
3
P1 positive and end-to-end cases — run on every build.
2 · Regression
15
All cases, incl. 3 negative and 5 edge — run before release.
3 · End-to-end
3
Full user journeys — run nightly.
Start with these smoke cases
- PEOPLEHUB-01 — Apply and approve leave
- PEOPLEHUB-E2E-01 — Leave request approved end to end
- PEOPLEHUB-E2E-02 — Leave rejected with reason