Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fac1164

Browse files
committed
chore: improve e2e organization test (#15775)
1 parent 336e83b commit fac1164

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

site/e2e/tests/organizations.spec.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,27 @@ test("create and delete organization", async ({ page }) => {
1717
waitUntil: "domcontentloaded",
1818
});
1919

20-
await page.getByLabel("Slug", { exact: true }).fill("floop");
20+
await page.getByLabel("Slug").fill("floop");
2121
await page.getByLabel("Display name").fill("Floop");
2222
await page.getByLabel("Description").fill("Org description floop");
2323
await page.getByLabel("Icon", { exact: true }).fill("/emojis/1f957.png");
24-
2524
await page.getByRole("button", { name: "Submit" }).click();
2625

2726
// Expect to be redirected to the new organization
2827
await expectUrl(page).toHavePathName("/organizations/floop");
2928
await expect(page.getByText("Organization created.")).toBeVisible();
3029

30+
await page.getByLabel("Slug").fill("wibble");
31+
await page.getByLabel("Description").fill("Org description wibble");
32+
await page.getByRole("button", { name: "Submit" }).click();
33+
34+
// Expect to be redirected when renaming the organization
35+
await expectUrl(page).toHavePathName("/organizations/wibble");
36+
await expect(page.getByText("Organization settings updated.")).toBeVisible();
37+
3138
await page.getByRole("button", { name: "Delete this organization" }).click();
3239
const dialog = page.getByTestId("dialog");
33-
await dialog.getByLabel("Name").fill("floop");
40+
await dialog.getByLabel("Name").fill("wibble");
3441
await dialog.getByRole("button", { name: "Delete" }).click();
3542
await expect(page.getByText("Organization deleted.")).toBeVisible();
3643
});

0 commit comments

Comments
 (0)