0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-23 10:45:28 +01:00
gitea/tests/e2e/org.test.ts
silverwind 766ba0184a
Revert e2e repo create/delete to API calls, double timeouts
Revert createRepo/deleteRepo to API-based functions for test
reliability. The UI-based versions were flaky due to navigation
timing. Also double all playwright timeouts (local and CI), rename
API functions to apiX convention, and disable playwright/expect-expect
lint rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 03:21:28 +01:00

14 lines
557 B
TypeScript

import {test, expect} from '@playwright/test';
import {login, apiDeleteOrg} from './utils.ts';
test('create an organization', async ({page}) => {
const orgName = `e2e-org-${Date.now()}`;
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);
});