mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-08 19:00:05 +00:00
feat(ui): support additional job status selection in dropdown menu on Actions tab
This commit is contained in:
parent
462ad7bb33
commit
577fc173da
2 changed files with 14 additions and 6 deletions
|
|
@ -127,7 +127,7 @@ type StatusInfo struct {
|
|||
// GetStatusInfoList returns a slice of StatusInfo
|
||||
func GetStatusInfoList(ctx context.Context, lang translation.Locale) []StatusInfo {
|
||||
// same as those in aggregateJobStatus
|
||||
allStatus := []Status{StatusSuccess, StatusFailure, StatusWaiting, StatusRunning}
|
||||
allStatus := []Status{StatusSuccess, StatusFailure, StatusWaiting, StatusRunning, StatusBlocked, StatusCancelled, StatusSkipped}
|
||||
statusInfoList := make([]StatusInfo, 0, 4)
|
||||
for _, s := range allStatus {
|
||||
statusInfoList = append(statusInfoList, StatusInfo{
|
||||
|
|
|
|||
|
|
@ -203,11 +203,19 @@ test.describe('workflow list dynamic refresh', () => {
|
|||
await page.locator('#workflow_dispatch_dropdown>button').click();
|
||||
|
||||
// Status dropdown
|
||||
await expect(page.getByText('Waiting')).toBeHidden();
|
||||
await expect(page.getByText('Failure')).toBeHidden();
|
||||
await page.locator('#status_dropdown').click();
|
||||
await expect(page.getByText('Waiting')).toBeVisible();
|
||||
await expect(page.getByText('Failure')).toBeVisible();
|
||||
const dropdown = page.locator('#status_dropdown');
|
||||
const dropdown_menu = dropdown.locator('.menu');
|
||||
await expect(dropdown_menu).toBeHidden();
|
||||
await dropdown.click();
|
||||
await expect(dropdown_menu).toBeVisible();
|
||||
await expect(dropdown_menu.getByText('All status')).toHaveAttribute('href', /&status=0$/);
|
||||
await expect(dropdown_menu.getByText('Success')).toHaveAttribute('href', /&status=1$/);
|
||||
await expect(dropdown_menu.getByText('Failure')).toHaveAttribute('href', /&status=2$/);
|
||||
await expect(dropdown_menu.getByText('Waiting')).toHaveAttribute('href', /&status=5$/);
|
||||
await expect(dropdown_menu.getByText('Running')).toHaveAttribute('href', /&status=6$/);
|
||||
await expect(dropdown_menu.getByText('Blocked')).toHaveAttribute('href', /&status=7$/);
|
||||
await expect(dropdown_menu.getByText('Canceled')).toHaveAttribute('href', /&status=3$/);
|
||||
await expect(dropdown_menu.getByText('Skipped')).toHaveAttribute('href', /&status=4$/);
|
||||
|
||||
// Actor dropdown
|
||||
await expect(page.getByText('All actors')).toBeHidden();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue