Modification visuel status et type issue

This commit is contained in:
2026-05-26 07:54:10 +02:00
parent 4f3729909e
commit 531c31093e
9 changed files with 220 additions and 37 deletions
@@ -287,34 +287,30 @@ describe('IssueDetail — existing issue', () => {
});
});
describe('getBadgeClass / typeBadgeClass', () => {
it('typeBadgeClass returns class for current issue type', () => {
describe('typeIcon', () => {
it('typeIcon returns correct icon for current issue type', () => {
(component as any).issue.type = 'Bug';
expect((component as any).typeBadgeClass).toBe('text-bg-danger');
expect((component as any).typeIcon('Bug')).toEqual({ letter: 'B', bg: '#dc2626' });
});
it('getBadgeClass maps Bug to text-bg-danger', () => {
expect((component as any).getBadgeClass('Bug')).toBe('text-bg-danger');
it('typeIcon maps Epic correctly', () => {
expect((component as any).typeIcon('Epic')).toEqual({ letter: 'E', bg: '#7c3aed' });
});
it('getBadgeClass maps Study to text-bg-secondary', () => {
expect((component as any).getBadgeClass('Study')).toBe('text-bg-secondary');
it('typeIcon maps Story correctly', () => {
expect((component as any).typeIcon('Story')).toEqual({ letter: 'S', bg: '#16a34a' });
});
it('getBadgeClass maps Story to text-bg-success', () => {
expect((component as any).getBadgeClass('Story')).toBe('text-bg-success');
it('typeIcon maps Task correctly', () => {
expect((component as any).typeIcon('Task')).toEqual({ letter: 'T', bg: '#2563eb' });
});
it('getBadgeClass maps Task to text-bg-primary', () => {
expect((component as any).getBadgeClass('Task')).toBe('text-bg-primary');
it('typeIcon maps Technical Story correctly', () => {
expect((component as any).typeIcon('Technical Story')).toEqual({ letter: 'TS', bg: '#d97706' });
});
it('getBadgeClass maps Technical Story to text-bg-warning', () => {
expect((component as any).getBadgeClass('Technical Story')).toBe('text-bg-warning');
});
it('getBadgeClass maps Epic to text-bg-info', () => {
expect((component as any).getBadgeClass('Epic')).toBe('text-bg-info');
it('typeIcon maps Study correctly', () => {
expect((component as any).typeIcon('Study')).toEqual({ letter: 'St', bg: '#6b7280' });
});
});