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

Function createGroup

site/e2e/helpers.ts:343–360  ·  view source on GitHub ↗
(
	page: Page,
	organization?: string,
)

Source from the content-addressed store, hash-verified

341 * random name.
342 */
343export const createGroup = async (
344 page: Page,
345 organization?: string,
346): Promise<string> => {
347 const prefix = organization
348 ? `/organizations/${organization}`
349 : "/deployment";
350 await page.goto(`${prefix}/groups/create`, {
351 waitUntil: "domcontentloaded",
352 });
353 await expectUrl(page).toHavePathName(`${prefix}/groups/create`);
354
355 const name = randomName();
356 await page.getByLabel("Name", { exact: true }).fill(name);
357 await page.getByRole("button", { name: /save/i }).click();
358 await expectUrl(page).toHavePathName(`${prefix}/groups/${name}`);
359 return name;
360};
361
362/**
363 * sshIntoWorkspace spawns a Coder SSH process and a client connected to it.

Callers 1

Calls 1

randomNameFunction · 0.85

Tested by

no test coverage detected