mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-23 10:45:28 +01:00
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>
14 lines
557 B
TypeScript
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);
|
|
});
|