195 — should add two teams with different roles to client members and delete one¶
Description¶
Verifies that two teams can each be added to a client with a different role, that a member belonging to both teams accumulates both roles, and that removing one of the teams from the owner correctly strips only that team and that role from the affected rows.
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 and two teams have been pre-created (Team 1 = employee 1 + employee 2, Team 2 = employee 2 + employee 3)
- Browser is on the client's Members tab
Steps¶
- Click Add teams, pick Team 1 with Role 1, click Save.
- Click Add teams again, pick Team 2 with Role 2, click Save, then reload. Expected: the list has 4 entries.
- Verify the rows. Expected: employee 1 shows Team 1 / Role 1; employee 2 shows Team 1, Team 2 / Role 1, Role 2; employee 3 shows Team 2 / Role 2; the owner shows Team 1, Team 2 / Client Owner + Role 1 + Role 2.
- Click Remove team on the owner's Team 2 row and confirm. Expected: a "team removed" toast appears.
- Verify the resulting list. Expected: the list has 3 entries — employee 2 shows only Team 1 but keeps both Role 1 and Role 2; employee 1 still shows Team 1 / Role 1; the owner shows Team 1 with Client Owner + Role 1 + Role 2 (employee 3 — Team 2 only — is gone).
Related¶
- Spec:
playwright/tests/integration/client.spec.ts(line 768)