Skip to content

Commit 1bac277

Browse files
authored
chore: improve e2e organization test (coder#15775)
1 parent bc4f9a4 commit 1bac277

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

site/e2e/tests/organizations.spec.ts

Lines changed: 10 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy