Files
upstream-gitea/tests/e2e/pull-merge-box.test.ts
upstream-mirror 52ae0c5802
Some checks failed
cache-seeder / prune (push) Has been skipped
cache-seeder / frontend (push) Failing after 3s
cache-seeder / python (push) Failing after 3s
cache-seeder / gobuild (push) Failing after 4s
cache-seeder / lint (bindata, lint-backend) (push) Failing after 3s
giteabot backport / giteabot (push) Has been skipped
giteabot / giteabot (push) Has been skipped
cache-prune / prune (push) Has been skipped
release-nightly-snapcraft / build-and-publish (ubuntu-24.04) (push) Has been cancelled
release-nightly-snapcraft / build-and-publish (ubuntu-24.04-arm) (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-renovate / cron-renovate (push) Has been skipped
snapshot of https://github.com/go-gitea/gitea.git (main, 2026-09-15; blobs > 131072B omitted)
2026-09-15 21:41:59 +05:00

24 lines
1.1 KiB
TypeScript

import {env} from 'node:process';
import {test, expect} from '@playwright/test';
import {apiCreateFiles, apiCreatePR, apiCreateRepo, assertNoJsError, login, randomString} from './utils.ts';
const owner = env.GITEA_TEST_E2E_USER;
test('merge box merges a pull request', async ({page, request}) => {
const repo = `e2e-merge-box-${randomString(8)}`;
const createPR = (async () => {
await apiCreateRepo(request, {name: repo});
await apiCreateFiles(request, owner, repo, [{path: 'feat.txt', content: 'feature\n'}], {branch: 'main', newBranch: 'feat'});
return apiCreatePR(request, owner, repo, 'feat', 'main', 'merge box test');
})();
const [index] = await Promise.all([createPR, login(page)]);
await page.goto(`/${owner}/${repo}/pulls/${index}`, {waitUntil: 'commit'});
// expand the merge form, then submit the merge
await page.getByRole('button', {name: 'Create merge commit'}).click();
await page.locator('form.form-fetch-action').getByRole('button', {name: 'Create merge commit'}).click();
await expect(page.getByText(/successfully merged/i)).toBeVisible();
await assertNoJsError(page);
});