From 1bac277156d9e454c9da6378c53c2a7badcdd039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=B1=E3=82=A4=E3=83=A9?= Date: Mon, 9 Dec 2024 13:29:30 -0700 Subject: [PATCH] chore: improve e2e organization test (#15775) --- site/e2e/tests/organizations.spec.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/site/e2e/tests/organizations.spec.ts b/site/e2e/tests/organizations.spec.ts index a0cc6089c4..625eac4762 100644 --- a/site/e2e/tests/organizations.spec.ts +++ b/site/e2e/tests/organizations.spec.ts @@ -17,20 +17,27 @@ test("create and delete organization", async ({ page }) => { waitUntil: "domcontentloaded", }); - await page.getByLabel("Slug", { exact: true }).fill("floop"); + await page.getByLabel("Slug").fill("floop"); await page.getByLabel("Display name").fill("Floop"); await page.getByLabel("Description").fill("Org description floop"); await page.getByLabel("Icon", { exact: true }).fill("/emojis/1f957.png"); - await page.getByRole("button", { name: "Submit" }).click(); // Expect to be redirected to the new organization await expectUrl(page).toHavePathName("/organizations/floop"); await expect(page.getByText("Organization created.")).toBeVisible(); + await page.getByLabel("Slug").fill("wibble"); + await page.getByLabel("Description").fill("Org description wibble"); + await page.getByRole("button", { name: "Submit" }).click(); + + // Expect to be redirected when renaming the organization + await expectUrl(page).toHavePathName("/organizations/wibble"); + await expect(page.getByText("Organization settings updated.")).toBeVisible(); + await page.getByRole("button", { name: "Delete this organization" }).click(); const dialog = page.getByTestId("dialog"); - await dialog.getByLabel("Name").fill("floop"); + await dialog.getByLabel("Name").fill("wibble"); await dialog.getByRole("button", { name: "Delete" }).click(); await expect(page.getByText("Organization deleted.")).toBeVisible(); });