Files
forge/tests/e2e/release.test.ts
zeekay 89fb982af3 rebrand: GITEA_* -> GIT_* env
Matches the convention hanzo-git/runner already ships ('GIT_* env'). Verified no
mapping collides with git's own environment (GIT_DIR / GIT_CONFIG / GIT_WORK_TREE
and friends are untouched — Gitea used GITEA_WORK_DIR / GITEA_CONF / GITEA_CUSTOM,
which map to distinct GIT_ names).
2026-07-15 13:09:18 -07:00

20 lines
841 B
TypeScript

import {env} from 'node:process';
import {test, expect} from '@playwright/test';
import {login, apiCreateRepo, randomString} from './utils.ts';
test('create a release', async ({page, request}) => {
const repoName = `e2e-release-${randomString(8)}`;
const owner = env.GIT_TEST_E2E_USER;
await Promise.all([apiCreateRepo(request, {name: repoName}), login(page)]);
await page.goto(`/${owner}/${repoName}/releases/new`);
const tag = `v1.0.0-${randomString(8)}`;
const title = `e2e-release-${randomString(8)}`;
await page.getByLabel('Tag name').fill(tag);
await page.getByLabel('Release title').fill(title);
await page.getByRole('button', {name: 'Publish Release'}).click();
await page.waitForURL(new RegExp(`/${owner}/${repoName}/releases$`));
await expect(page.locator('.release-list-title')).toContainText(title);
});