mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix admin can demote owner
This commit is contained in:
@@ -52,3 +52,20 @@ test("Lists files in the drafts page", async ({ page }) => {
|
||||
dashboardPage.page.getByRole("button", { name: /New File 2/ }),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test("Bug 9443, Admin can not demote owner", async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.setupDashboardFull();
|
||||
await DashboardPage.mockRPC(
|
||||
page,
|
||||
"get-team-members?team-id=*",
|
||||
"dashboard/get-team-members-admin.json",
|
||||
);
|
||||
|
||||
await dashboardPage.goToSecondTeamMembersSection();
|
||||
|
||||
await expect(page.getByRole("heading", { name: "Members" })).toBeVisible();
|
||||
await expect(page.getByRole("combobox", { name: "Admin" })).toBeVisible();
|
||||
await expect(page.getByText("Owner")).toBeVisible();
|
||||
await expect(page.getByRole("combobox", { name: "Owner" })).toHaveCount(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user