mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 22:13:26 +09:00
test(e2e): add comment, release, star, PR and fork tests (#37800)
Adds Playwright e2e coverage for five high-value workflows, each driven through semantic locators with API-based setup: - comment on and close an issue - publish a release - star and watch a repository - create a pull request from the compare page - fork a repository Also passes `autoInit: false` in existing tests that only exercise DB-backed units (issues, reactions, milestones, projects, events), skipping an unused initial commit to speed up their setup and reduce parallel git contention. --- This PR was written with the help of Claude Opus 4.7 --------- Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: Nicolas <bircni@icloud.com>
This commit is contained in:
co-authored by
Claude
Nicolas
parent
4c37f4dacb
commit
7c12446c1f
@@ -5,7 +5,7 @@ import {login, apiCreateRepo, apiCreateIssue, apiDeleteRepo, createProject, crea
|
||||
test('assign issue to project and change column', async ({page}) => {
|
||||
const repoName = `e2e-issue-project-${randomString(8)}`;
|
||||
const user = env.GITEA_TEST_E2E_USER;
|
||||
await Promise.all([login(page), apiCreateRepo(page.request, {name: repoName})]);
|
||||
await Promise.all([login(page), apiCreateRepo(page.request, {name: repoName, autoInit: false})]);
|
||||
await page.goto(`/${user}/${repoName}/projects/new`);
|
||||
await page.locator('input[name="title"]').fill('Kanban Board');
|
||||
await page.getByRole('button', {name: 'Create Project'}).click();
|
||||
@@ -33,7 +33,7 @@ test('create a project', async ({page}) => {
|
||||
const projectTitle = 'Test Project';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Navigate to new project page
|
||||
@@ -62,7 +62,7 @@ test('assign issue to multiple projects via sidebar', async ({page}) => {
|
||||
const issueTitle = 'Test issue for multiple projects';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Create two projects via UI
|
||||
@@ -112,7 +112,7 @@ test('create issue with multiple projects pre-selected', async ({page}) => {
|
||||
const issueTitle = 'Issue with multiple projects';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Create two projects via UI
|
||||
@@ -163,7 +163,7 @@ test('filter issues by multiple projects in issue list', async ({page}) => {
|
||||
const project2Title = 'Filter Project B';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Create two projects via UI
|
||||
@@ -229,7 +229,7 @@ test('remove issue from one project keeping others', async ({page}) => {
|
||||
const issueTitle = 'Issue to modify projects';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Create two projects via UI
|
||||
@@ -288,7 +288,7 @@ test('filter issues with no project using project=-1', async ({page}) => {
|
||||
const projectTitle = 'Some Project';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Create a project via UI
|
||||
@@ -349,7 +349,7 @@ test('close project and view in closed projects list', async ({page}) => {
|
||||
const closedProjectTitle = 'Project To Close';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Create two projects via UI
|
||||
@@ -404,7 +404,7 @@ test('select projects on new issue page shows in sidebar', async ({page}) => {
|
||||
const project2Title = 'Project Two';
|
||||
|
||||
await login(page);
|
||||
await apiCreateRepo(page.request, {name: repoName});
|
||||
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
|
||||
|
||||
try {
|
||||
// Create two projects
|
||||
|
||||
Reference in New Issue
Block a user