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¶
- Click "Add members", pick member1 in the Members field, and pick teamRoleName1 and teamRoleName2 in the Roles field.
- 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".
- Click "Add members" again, pick member1, member2, and the signed-in user (ownerName), and pick teamRoleName3 in the Roles field.
- Click Save. Expected: a "Member already added" warning appears for member1 and for the signed-in user (ownerName).
- Expected: the Members list shows 3 members.
- Expected: member1's row still shows the original roles teamRoleName1 and teamRoleName2 (the new role was not applied to them).
- Expected: the signed-in user's row still shows the role "Team Owner" (the new role was not applied).
- Expected: member2's row shows their email and only the newly chosen role teamRoleName3.
Related¶
- Spec:
playwright/tests/integration/teams.spec.ts(line 251)