feat: gitea: queries
runner nix smoke / nix label and flake smoke (push) Failing after 1m16s

This commit is contained in:
2026-09-29 17:23:48 +00:00
parent 3f7856b4aa
commit c93dee27b3
10 changed files with 686 additions and 3 deletions
@@ -28,6 +28,85 @@ test('assign issue to project and change column', async ({page}) => {
await apiDeleteRepo(page.request, user, repoName);
});
test('refreshes project board after issue project changes in another tab', async ({page, context}) => {
const repoName = `e2e-project-refresh-${randomString(8)}`;
const user = env.GITEA_TEST_E2E_USER;
await login(page);
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
try {
const project = await createProject(page, {
owner: user,
repo: repoName,
title: 'Refresh Board',
});
const issue = await apiCreateIssue(page.request, {
owner: user,
repo: repoName,
title: 'Refresh board issue',
projects: [project.id],
});
await page.goto(`/${user}/${repoName}/projects/${project.id}`);
await expect(page.locator('.issue-card')).toContainText('Refresh board issue');
await using issuePage = await context.newPage();
await issuePage.goto(`/${user}/${repoName}/issues/${issue.index}`);
await issuePage.locator('.sidebar-project-combo > .ui.dropdown').click();
await issuePage.locator(`.sidebar-project-combo > .ui.dropdown .item[data-value="${project.id}"]`).click();
await issuePage.locator('.issue-content-left').click();
await expect(issuePage.locator(`.item.sidebar-project-card:has-text("Refresh Board")`)).toBeHidden();
await page.bringToFront();
await expect(page.locator('.issue-card')).not.toContainText('Refresh board issue');
} finally {
await apiDeleteRepo(page.request, user, repoName);
}
});
test('filters and groups project cards without navigation', async ({page}) => {
const repoName = `e2e-project-filter-${randomString(8)}`;
const user = env.GITEA_TEST_E2E_USER;
await login(page);
await apiCreateRepo(page.request, {name: repoName, autoInit: false});
try {
const project = await createProject(page, {
owner: user,
repo: repoName,
title: 'Filter Board',
});
await Promise.all([
apiCreateIssue(page.request, {owner: user, repo: repoName, title: 'Alpha card', projects: [project.id]}),
apiCreateIssue(page.request, {owner: user, repo: repoName, title: 'Beta card', projects: [project.id]}),
]);
await page.goto(`/${user}/${repoName}/projects/${project.id}`);
const boardUrl = page.url();
await page.locator('[data-project-filter-input]').fill('state:open title:Alpha');
await expect(page.locator('.issue-card')).toHaveCount(1);
await expect(page.locator('.issue-card')).toContainText('Alpha card');
await expect(page.locator('.issue-card')).not.toContainText('Beta card');
await expect(page).toHaveURL(`${boardUrl}?filter=state%3Aopen+title%3AAlpha`);
await page.locator('[data-project-filter-input]').fill('state:open title:Beta');
await expect(page.locator('.issue-card')).toHaveCount(1);
await expect(page.locator('.issue-card')).toContainText('Beta card');
await expect(page.locator('.issue-card')).not.toContainText('Alpha card');
await page.locator('[data-project-filter-clear]').click();
await expect(page.locator('.issue-card')).toHaveCount(2);
await expect(page).toHaveURL(boardUrl);
await page.locator('[data-project-group-by]').selectOption('assignee');
await expect(page.locator('.project-card-group-header')).toHaveText('No value');
await expect(page.locator('.project-card-group-cards .issue-card')).toHaveCount(2);
await expect(page).toHaveURL(`${boardUrl}?group_by=assignee`);
} finally {
await apiDeleteRepo(page.request, user, repoName);
}
});
test('create a project', async ({page}) => {
const repoName = `e2e-project-repo-${Date.now()}`;
const projectTitle = 'Test Project';