QA
Senior~35 minEnd-to-endUI + APIRole switchingData seeding and clean-upWorkflow

End-to-end: hire to leave approval across roles and layers

App: PeopleDesk HR, a practice HR management portal (OrangeHRM-style). Login: Admin / admin123, or any employee as first.last / Welcome@1 (for example vikram.singh). REST API: tests call it as /api/... through the request fixture or page.request; GET /api lists every endpoint ↗.

Build the framework →

Interview scenario

"HR's critical path: a new hire is created, logs in, applies for leave, punches in, and a manager approves. Automate it across both roles and both layers: seed the hire through the API, drive the employee through the UI, verify with the API, approve as Admin in the UI, verify the balance through the API, and leave no data behind."

Acceptance criteria

  1. API (page.request, Admin): create an employee with a unique last name, jobTitle QA Engineer, department Quality Engineering. Keep the id.
  2. UI: log in as that employee (first.last / Welcome@1); My Info shows the name and id. Apply for Sick Leave 2026-12-01 to 2026-12-02 and assert Pending Approval; punch in on the Time page and assert the status.
  3. API (same session): GET /api/leave has 1 request with days 2 and status Pending Approval; GET /api/attendance has an open punch.
  4. UI: log out, log in as Admin, approve the request from the Leave list and assert Scheduled. API: GET /api/leave/balance?employeeId=<id> shows Sick Leave used 2, available 8. Clean-up in afterEach: DELETE the employee and assert 404.

🔒 This lab is part of Pro

Pro unlocks the live editor, the scenario checks and the reference solutions in Playwright and Selenium Java for all 38 labs, plus every interview answer. One payment of ₹1,299, lifetime access. Already on a lower tier? Upgrade for the difference.