Skip to content

511 — should add member, try to delete myself from team which should fail

Description

Verifies that the sole team owner cannot remove themselves from the team — the system blocks the removal with a "team owner must remain" warning and keeps the team membership unchanged.

Preconditions

  • Signed-in admin user (the only team owner).
  • One seeded user (member1) is available.
  • A team has just been created and the team detail is open.

Steps

  1. Click "Add members", pick member1, pick the role teamRoleName1, and click Save. Expected: a success popup appears, the Members list shows 2 members, member1 has the role teamRoleName1, and the signed-in user shows "Team Owner".
  2. Click the Delete (trash) icon for the signed-in user's row. Expected: a confirmation modal asks the user to confirm removing themselves.
  3. Confirm the modal. Expected: an "Owner must remain" warning popup appears (the team must keep at least one owner).
  4. Expected: the Members list still shows 2 members. Expected: member1's row still shows the role teamRoleName1 and the signed-in user's row still shows "Team Owner" — nobody was removed.
  • Spec: playwright/tests/integration/teams.spec.ts (line 435)