0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-16 08:17:45 +02:00
gitea/tests/e2e/repo.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
542 B
TypeScript

import {env} from 'node:process';
import {test} from '@playwright/test';
import {login, apiDeleteRepo} from './utils.ts';
test('create a repository', async ({page}) => {
const repoName = `e2e-repo-${Date.now()}`;
await login(page);
await page.goto('/repo/create');
await page.locator('input[name="repo_name"]').fill(repoName);
await page.getByRole('button', {name: 'Create Repository'}).click();
await page.waitForURL(new RegExp(`/${env.E2E_USER}/${repoName}$`));
await apiDeleteRepo(page.request, env.E2E_USER, repoName);
});