MCPcopy Index your code
hub / github.com/coder/coder / createOrganization

Function createOrganization

site/e2e/helpers.ts:1352–1372  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

1350}
1351
1352export async function createOrganization(page: Page): Promise<{
1353 name: string;
1354 displayName: string;
1355 description: string;
1356}> {
1357 // Create a new organization to test
1358 await page.goto("/organizations/new", { waitUntil: "domcontentloaded" });
1359 const name = randomName();
1360 await page.getByLabel("Slug").fill(name);
1361 const displayName = `Org ${name}`;
1362 await page.getByLabel("Display name").fill(displayName);
1363 const description = `Org description ${name}`;
1364 await page.getByLabel("Description").fill(description);
1365 await page.getByLabel("Icon", { exact: true }).fill("/emojis/1f957.png");
1366 await page.getByRole("button", { name: /save/i }).click();
1367
1368 await expectUrl(page).toHavePathName(`/organizations/${name}`);
1369 await expect(page.getByText(/created successfully/)).toBeVisible();
1370
1371 return { name, displayName, description };
1372}
1373
1374/**
1375 * @param organization organization name

Callers 1

Calls 1

randomNameFunction · 0.85

Tested by

no test coverage detected