mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
Revert "Update semantic color tokens" (#6365)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user