AdvancedPW-EMP-00340 minutesPlaywright

Create an employee by API and verify the directory

A fast setup call creates a synthetic employee before the browser verifies the user-facing directory.

  • api
  • api-ui
  • tables

Objective

What to automate

Create a synthetic employee with the Practice API, then search for its deterministic ID in the directory.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-EMP-001.

Test data

  • name: Mira Employee
  • department: Quality Assurance
  • title: QA Engineer
  • location: Pune

Expected result

The API returns a session-scoped emp ID and the matching row appears in the directory.

Progressive hints

Hint 1

Create a Lab session and retain its CSRF token.

Hint 2

POST the full employee record to the employees endpoint.

Hint 3

Search the UI for the returned name and assert the role cell.

I’ve tried it — show solution
  1. Create a Lab session and retain its CSRF token.
  2. POST the full employee record to the employees endpoint.
  3. Search the UI for the returned name and assert the role cell.

The deliberately failing starter is in tests/employee-management.spec.ts inside the TypeScript starter ZIP.