AdvancedPW-EMP-00540 minutesPlaywright

Delete and reset the employee sandbox

A destructive UI operation remains harmless because it affects only the current synthetic session and reset restores the seed.

  • api
  • reset
  • isolation

Objective

What to automate

Delete a synthetic employee, accept the confirmation dialog, reset the sandbox, and verify seed results return.

Preconditions and test data

Preconditions

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

Test data

  • confirmation: Delete this synthetic employee?

Expected result

The deletion is local to the active session and reset restores the deterministic employee seed.

Progressive hints

Hint 1

Register the confirmation-dialog handler before selecting Delete.

Hint 2

Assert the session-only delete status message.

Hint 3

Select Reset employee sandbox and reload the directory.

I’ve tried it — show solution
  1. Register the confirmation-dialog handler before selecting Delete.
  2. Assert the session-only delete status message.
  3. Select Reset employee sandbox and reload the directory.

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