|
|
@@ -19,7 +19,7 @@ describe('Initialization', () => {
|
|
|
it('should add a base threshold if missing', () => {
|
|
|
const instance = setup();
|
|
|
|
|
|
- expect(instance.state.thresholds).toEqual([{ index: 0, value: -Infinity, color: '#7EB26D' }]);
|
|
|
+ expect(instance.state.thresholds).toEqual([{ index: 0, value: -Infinity, color: '#299c46' }]);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -31,13 +31,13 @@ describe('Add threshold', () => {
|
|
|
|
|
|
expect(instance.state.thresholds).toEqual([
|
|
|
{ index: 1, value: 50, color: '#EAB839' },
|
|
|
- { index: 0, value: -Infinity, color: '#7EB26D' },
|
|
|
+ { index: 0, value: -Infinity, color: '#299c46' },
|
|
|
]);
|
|
|
});
|
|
|
|
|
|
it('should add another threshold above a first', () => {
|
|
|
const instance = setup({
|
|
|
- thresholds: [{ index: 0, value: -Infinity, color: '#7EB26D' }, { index: 1, value: 50, color: '#EAB839' }],
|
|
|
+ thresholds: [{ index: 0, value: -Infinity, color: '#299c46' }, { index: 1, value: 50, color: '#EAB839' }],
|
|
|
});
|
|
|
|
|
|
instance.onAddThreshold(2);
|
|
|
@@ -45,14 +45,14 @@ describe('Add threshold', () => {
|
|
|
expect(instance.state.thresholds).toEqual([
|
|
|
{ index: 2, value: 75, color: '#6ED0E0' },
|
|
|
{ index: 1, value: 50, color: '#EAB839' },
|
|
|
- { index: 0, value: -Infinity, color: '#7EB26D' },
|
|
|
+ { index: 0, value: -Infinity, color: '#299c46' },
|
|
|
]);
|
|
|
});
|
|
|
|
|
|
it('should add another threshold between first and second index', () => {
|
|
|
const instance = setup({
|
|
|
thresholds: [
|
|
|
- { index: 0, value: -Infinity, color: '#7EB26D' },
|
|
|
+ { index: 0, value: -Infinity, color: '#299c46' },
|
|
|
{ index: 1, value: 50, color: '#EAB839' },
|
|
|
{ index: 2, value: 75, color: '#6ED0E0' },
|
|
|
],
|
|
|
@@ -64,7 +64,7 @@ describe('Add threshold', () => {
|
|
|
{ index: 3, value: 75, color: '#EF843C' },
|
|
|
{ index: 2, value: 62.5, color: '#6ED0E0' },
|
|
|
{ index: 1, value: 50, color: '#EAB839' },
|
|
|
- { index: 0, value: -Infinity, color: '#7EB26D' },
|
|
|
+ { index: 0, value: -Infinity, color: '#299c46' },
|
|
|
]);
|
|
|
});
|
|
|
});
|
|
|
@@ -73,7 +73,7 @@ describe('change threshold value', () => {
|
|
|
it('should update value and resort rows', () => {
|
|
|
const instance = setup();
|
|
|
const thresholds = [
|
|
|
- { index: 0, value: -Infinity, color: '#7EB26D' },
|
|
|
+ { index: 0, value: -Infinity, color: '#299c46' },
|
|
|
{ index: 1, value: 50, color: '#EAB839' },
|
|
|
{ index: 2, value: 75, color: '#6ED0E0' },
|
|
|
];
|
|
|
@@ -88,7 +88,7 @@ describe('change threshold value', () => {
|
|
|
instance.onChangeThresholdValue(mockEvent, thresholds[1]);
|
|
|
|
|
|
expect(instance.state.thresholds).toEqual([
|
|
|
- { index: 0, value: -Infinity, color: '#7EB26D' },
|
|
|
+ { index: 0, value: -Infinity, color: '#299c46' },
|
|
|
{ index: 1, value: 78, color: '#EAB839' },
|
|
|
{ index: 2, value: 75, color: '#6ED0E0' },
|
|
|
]);
|