185 — should add two users to client members and then add the same member again¶
Description¶
Verifies the duplicate-member guard on a client's Members tab: when a second Add Members action includes users who are already part of the client (including the owner), the system shows an "already added" warning and does not duplicate them or alter their existing roles.
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¶
- Click Add members, add employee 1 and employee 2 with Role 1, then Save. Expected: a success toast appears, the list shows 3 entries, and both employees have Role 1.
- Click Add members again and try to add the owner and employee 2 with Role 1, then Save. Expected: a success toast appears, but both the owner and employee 2 are flagged in the "member already added" warning.
- Re-check the list. Expected: the list still has 3 entries — employee 1 and employee 2 keep Role 1, and the owner keeps the Client Owner role.
Related¶
- Spec:
playwright/tests/integration/client.spec.ts(line 553)