mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-08 20:26:08 -05:00
Prevent unreg and kicking members in invitational tournaments
This commit is contained in:
@@ -28,6 +28,8 @@ export class TournamentRegisterPage {
|
||||
"Registration for this tournament has closed",
|
||||
),
|
||||
leaveTeamButton: page.getByRole("button", { name: "Leave the team" }),
|
||||
deleteMemberButton: page.getByRole("button", { name: "Delete member" }),
|
||||
unregisterButton: page.getByRole("button", { name: "Unregister" }),
|
||||
organizerAddedLeaveExplanation: page.getByText(
|
||||
"You were added to the team by the organizer. Contact the TO to leave the team.",
|
||||
),
|
||||
|
||||
@@ -85,6 +85,13 @@ test.describe("Invitational tournament", () => {
|
||||
await expect(
|
||||
register.locators.organizerAddedLeaveExplanation,
|
||||
).toBeVisible();
|
||||
|
||||
// nor can the captain kick them, the organizer owns the roster
|
||||
await impersonate(page, captain.id);
|
||||
await register.goto(tournament.id);
|
||||
await expect(register.member(2)).toBeVisible();
|
||||
await expect(register.locators.deleteMemberButton).toHaveCount(0);
|
||||
await expect(register.locators.unregisterButton).toHaveCount(0);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user