Skip to content

432 — should add team to project members and remove a team member

Description

Verifies that adding a whole team to a project also adds every team member with the chosen role, that the owner (if a team member) keeps "Project Owner" alongside the team role, and that removing a single user from the team via the project members table cascades correctly.

Preconditions

  • Signed-in tenant with a seeded project, two seeded employees, one seeded project role, and one seeded team containing both employees plus the owner.
  • Project Members page open for the seeded project (owner is the implicit member).

Steps

  1. Inspect the owner's row. Expected: the owner shows team "-" and role "Project Owner".
  2. Click "Add teams", pick the seeded team, pick role 1, and click "Save". Expected: the members table now lists 3 members (owner + 2 team members).
  3. Expected: employee 1 is shown with the team name and role 1.
  4. Expected: employee 2 is shown with the team name and role 1.
  5. Expected: the owner is shown with the team name and the combined roles ["Project Owner", role 1].
  6. Click the "remove from team" action on employee 1's row for that team. Expected: a delete-team-member confirmation modal is shown.
  7. Confirm the delete modal. Expected: a "Team removed" toast is shown.
  8. Expected: the members table now lists 1 member — only the owner — with team "-" and the combined roles ["Project Owner", role 1] (removing one user dissolves the team from the project membership).
  • Spec: playwright/tests/integration/project.spec.ts (line 483)