2026-02-21 01:26:47 +01:00
|
|
|
import {test, expect} from '@playwright/test';
|
2026-04-03 19:20:44 +02:00
|
|
|
import {login, apiDeleteOrg, randomString} from './utils.ts';
|
2026-02-21 01:26:47 +01:00
|
|
|
|
|
|
|
|
test('create an organization', async ({page}) => {
|
2026-04-03 19:20:44 +02:00
|
|
|
const orgName = `e2e-org-${randomString(8)}`;
|
2026-02-21 01:26:47 +01:00
|
|
|
await login(page);
|
|
|
|
|
await page.goto('/org/create');
|
|
|
|
|
await page.getByLabel('Organization Name').fill(orgName);
|
|
|
|
|
await page.getByRole('button', {name: 'Create Organization'}).click();
|
|
|
|
|
await expect(page).toHaveURL(new RegExp(`/org/${orgName}`));
|
|
|
|
|
// delete via API because of issues related to form-fetch-action
|
|
|
|
|
await apiDeleteOrg(page.request, orgName);
|
|
|
|
|
});
|