mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-18 22:25:25 +01:00
Always start an isolated ephemeral Gitea instance with its own temp directory, SQLite database, and config file. This addresses review feedback that using the developer's existing instance is unreliable. - Rewrite test-e2e.sh to create a temp workdir, find a free port, write a minimal app.ini, start the server, and clean up on exit - Build a separate gitea-e2e binary using TEST_TAGS (includes sqlite) - Simplify CI workflow: remove manual app.ini, server start, and redundant build steps - Rename all env vars to use GITEA_TEST_E2E_* prefix - Rename test user from "e2e" to "e2e-user" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
15 lines
686 B
TypeScript
15 lines
686 B
TypeScript
import {env} from 'node:process';
|
|
import {test, expect} from '@playwright/test';
|
|
import {login, apiCreateRepo, apiDeleteRepo} from './utils.ts';
|
|
|
|
test('create a milestone', async ({page}) => {
|
|
const repoName = `e2e-milestone-${Date.now()}`;
|
|
await login(page);
|
|
await apiCreateRepo(page.request, {name: repoName});
|
|
await page.goto(`/${env.GITEA_TEST_E2E_USER}/${repoName}/milestones/new`);
|
|
await page.getByPlaceholder('Title').fill('Test Milestone');
|
|
await page.getByRole('button', {name: 'Create Milestone'}).click();
|
|
await expect(page.locator('.milestone-list')).toContainText('Test Milestone');
|
|
await apiDeleteRepo(page.request, env.GITEA_TEST_E2E_USER, repoName);
|
|
});
|