Skip to content

502 — should add members which were already added with one new member

Description

Verifies that when an admin re-submits the Add-members form with some members who are already on the team plus a brand-new member, the existing members are flagged with a warning and keep their original roles, while the new member is added with the newly chosen role.

Preconditions

  • Signed-in admin user (the team owner).
  • Two seeded users (member1, member2) are available.
  • A team has just been created and the team detail is open.

Steps

  1. Click "Add members", pick member1 in the Members field, and pick teamRoleName1 and teamRoleName2 in the Roles field.
  2. Click Save. Expected: a success popup appears, the Members list shows 2 members, member1 has the roles teamRoleName1 and teamRoleName2, and the signed-in user is shown as "Team Owner".
  3. Click "Add members" again, pick member1, member2, and the signed-in user (ownerName), and pick teamRoleName3 in the Roles field.
  4. Click Save. Expected: a "Member already added" warning appears for member1 and for the signed-in user (ownerName).
  5. Expected: the Members list shows 3 members.
  6. Expected: member1's row still shows the original roles teamRoleName1 and teamRoleName2 (the new role was not applied to them).
  7. Expected: the signed-in user's row still shows the role "Team Owner" (the new role was not applied).
  8. Expected: member2's row shows their email and only the newly chosen role teamRoleName3.
  • Spec: playwright/tests/integration/teams.spec.ts (line 251)