Skip to content

191 — should add user to client members and try to delete owner

Description

Verifies the "at least one owner must remain" rule on clients: attempting to remove the sole Client Owner while another non-owner member exists is blocked with a dedicated warning.

Preconditions

  • Signed-in user (the owner) inside a freshly registered organization
  • A client and five additional employees have been seeded via the API
  • Two client roles have been pre-created
  • Browser is on the client's Members tab

Steps

  1. Click Add members, add employee 1 with Role 1, then Save. Expected: a success toast appears and the list has 2 entries (owner + employee 1).
  2. Click the row-level Delete action on the owner's row. Expected: the delete-member confirmation modal opens.
  3. Confirm the deletion. Expected: an "owner must remain" warning is displayed and the owner stays in the list.
  • Spec: playwright/tests/integration/client.spec.ts (line 657)