Skip to content

Commit 1dd840d

Browse files
authored
test: add an e2e test for removing a group (#12844)
1 parent f705f9a commit 1dd840d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

site/e2e/tests/updateTemplate.spec.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ test("add and remove a group", async ({ page }) => {
3737
// Select the group from the list and add it
3838
await page.getByText(groupName).click();
3939
await page.getByText("Add member").click();
40-
await expect(
41-
page.locator(".MuiTable-root").getByText(groupName),
42-
).toBeVisible();
40+
const row = page.locator(".MuiTableRow-root", { hasText: groupName });
41+
await expect(row).toBeVisible();
42+
43+
// Now remove the group
44+
await row.getByLabel("More options").click();
45+
await page.getByText("Delete").click();
46+
await expect(page.getByText("Group removed successfully!")).toBeVisible();
47+
await expect(row).not.toBeVisible();
4348
});
4449

4550
test("require latest version", async ({ page }) => {

0 commit comments

Comments
 (0)