Revert "Update semantic color tokens" (#6365)

This commit is contained in:
Jacob Richman
2025-08-15 20:18:31 -07:00
committed by GitHub
parent d57cc0b930
commit 6c1373c332
60 changed files with 502 additions and 606 deletions

View File

@@ -14,7 +14,7 @@ import {
CACHE_EFFICIENCY_HIGH,
CACHE_EFFICIENCY_MEDIUM,
} from './displayUtils.js';
import { theme } from '../semantic-colors.js';
import { Colors } from '../colors.js';
describe('displayUtils', () => {
describe('getStatusColor', () => {
@@ -24,24 +24,24 @@ describe('displayUtils', () => {
};
it('should return green for values >= green threshold', () => {
expect(getStatusColor(90, thresholds)).toBe(theme.status.success);
expect(getStatusColor(80, thresholds)).toBe(theme.status.success);
expect(getStatusColor(90, thresholds)).toBe(Colors.AccentGreen);
expect(getStatusColor(80, thresholds)).toBe(Colors.AccentGreen);
});
it('should return yellow for values < green and >= yellow threshold', () => {
expect(getStatusColor(79, thresholds)).toBe(theme.status.warning);
expect(getStatusColor(50, thresholds)).toBe(theme.status.warning);
expect(getStatusColor(79, thresholds)).toBe(Colors.AccentYellow);
expect(getStatusColor(50, thresholds)).toBe(Colors.AccentYellow);
});
it('should return red for values < yellow threshold', () => {
expect(getStatusColor(49, thresholds)).toBe(theme.status.error);
expect(getStatusColor(0, thresholds)).toBe(theme.status.error);
expect(getStatusColor(49, thresholds)).toBe(Colors.AccentRed);
expect(getStatusColor(0, thresholds)).toBe(Colors.AccentRed);
});
it('should return defaultColor for values < yellow threshold when provided', () => {
expect(
getStatusColor(49, thresholds, { defaultColor: theme.text.primary }),
).toBe(theme.text.primary);
getStatusColor(49, thresholds, { defaultColor: Colors.Foreground }),
).toBe(Colors.Foreground);
});
});