MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m52s
"Spalten anpassen" gets a colour dot per column that opens the choice: grey, anthracite (theme text colour), green, yellow, blue, red, purple or the accent. columnDotClass reads the column's colour (server defaults emerald/amber count as green/yellow; columns without one keep the colour of their role) and drives the Kanban header, the status dot in the list view and the task detail. Blue and purple come from new theme variables --color-info / --color-purple with fallbacks for light and dark themes. Docs and changelog updated; v0.31.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
1020 B
TypeScript
19 lines
1020 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { columnDotClass } from '../ManageColumnsModal';
|
|
|
|
describe('columnDotClass', () => {
|
|
it('uses the chosen colour, also the names of the server defaults', () => {
|
|
expect(columnDotClass({ id: 'x', name: 'Review', color: 'purple' })).toBe('bg-tone-purple');
|
|
expect(columnDotClass({ id: 'x', name: 'Blockiert', color: 'red' })).toBe('bg-status-err');
|
|
expect(columnDotClass({ id: 'waiting', name: 'Wartet', color: 'amber' })).toBe('bg-status-warn');
|
|
expect(columnDotClass({ id: 'done', name: 'Erledigt', color: 'emerald', isDone: true })).toBe('bg-status-ok');
|
|
});
|
|
|
|
it('keeps the colour of the role for columns without one', () => {
|
|
expect(columnDotClass({ id: 'in_progress', name: 'In Arbeit' })).toBe('bg-accent');
|
|
expect(columnDotClass({ id: 'x', name: 'Fertig', isDone: true })).toBe('bg-status-ok');
|
|
expect(columnDotClass({ id: 'x', name: 'Neu' })).toBe('bg-faint');
|
|
expect(columnDotClass(undefined)).toBe('bg-faint');
|
|
});
|
|
});
|