Commit fd44ec99 authored by Kev's avatar Kev 🐾 Committed by Tomas Vik (OOO back on 2026-08-31)
Browse files

fix: manual job has unknown status in sidebar tree

parent 989ea300
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -34,6 +34,16 @@ describe('CI Status Metadata', () => {
      expect(result.icon.id).toBe('clock');
      expect(result.name).toBe('Delayed');
    });

    it('returns "Manual" for a manual job', () => {
      const result = getJobMetadata({
        ...job,
        status: 'manual',
      } as unknown as RestJob);

      expect(result.icon.id).toBe('gear');
      expect(result.name).toBe('Manual');
    });
  });

  describe('getPipelineMetadata', () => {
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ type IconName =
  | 'debug-step-over'
  | 'question'
  | 'warning'
  | 'gear'
  | 'clock';

// colors
@@ -28,6 +29,7 @@ const icon = (name: IconName, color: string) =>
  new vscode.ThemeIcon(name, new vscode.ThemeColor(color));

const STATUS_METADATA = {
  manual: { name: 'Manual', icon: icon('gear', grayColor), priority: 0 },
  success: { name: 'Passed', icon: icon('pass', successColor), priority: 1 },
  created: { name: 'Created', icon: icon('debug-pause', grayColor), priority: 3 },
  waiting_for_resource: {