Browse Source

updating test

Peter Holmberg 7 năm trước cách đây
mục cha
commit
e11834e950

+ 1 - 1
public/app/plugins/panel/gauge/Threshold.test.tsx

@@ -38,8 +38,8 @@ describe('Add threshold', () => {
     instance.onAddThreshold(1);
     instance.onAddThreshold(1);
 
 
     expect(instance.state.thresholds).toEqual([
     expect(instance.state.thresholds).toEqual([
-      { index: 0, value: 50, color: 'rgb(127, 115, 64)' },
       { index: 1, value: 75, color: 'rgb(170, 95, 61)' },
       { index: 1, value: 75, color: 'rgb(170, 95, 61)' },
+      { index: 0, value: 50, color: 'rgb(127, 115, 64)' },
     ]);
     ]);
   });
   });
 });
 });

+ 0 - 2
public/app/plugins/panel/gauge/Thresholds.tsx

@@ -23,8 +23,6 @@ export default class Thresholds extends PureComponent<OptionModuleProps, State>
     const { maxValue, minValue } = this.props.options;
     const { maxValue, minValue } = this.props.options;
     const { thresholds } = this.state;
     const { thresholds } = this.state;
 
 
-    console.log('add at index:', index);
-
     const newThresholds = thresholds.map(threshold => {
     const newThresholds = thresholds.map(threshold => {
       if (threshold.index >= index) {
       if (threshold.index >= index) {
         threshold = { ...threshold, index: threshold.index + 1 };
         threshold = { ...threshold, index: threshold.index + 1 };