mirror of
https://github.com/hanzoai/forge.git
synced 2026-10-30 15:00:39 +00:00
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).
20 lines
841 B
TypeScript
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);
|
|
});
|