Fix progess test
This commit is contained in:
@@ -18,7 +18,7 @@ import React, { Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { withStyles } from '@material-ui/core';
|
||||
import { Circle } from 'rc-progress';
|
||||
import { COLORS } from '../theme/BackstageTheme';
|
||||
import { COLORS, V1 } from '../theme/BackstageTheme';
|
||||
|
||||
const styles = theme => ({
|
||||
root: {
|
||||
@@ -59,7 +59,7 @@ class CircleProgress extends Component {
|
||||
|
||||
static getProgressColor(value, inverse, max /* , classes */) {
|
||||
if (isNaN(value)) {
|
||||
return 'grey';
|
||||
return V1.palette.textVerySubtle;
|
||||
}
|
||||
|
||||
const actualMax = max ? max : CircleProgress.defaultProps.max;
|
||||
|
||||
@@ -56,6 +56,7 @@ describe('<CircleProgress />', () => {
|
||||
expect(CircleProgress.getProgressColor(50)).toBe(COLORS.STATUS.WARNING);
|
||||
expect(CircleProgress.getProgressColor(90)).toBe(COLORS.STATUS.OK);
|
||||
});
|
||||
|
||||
it('colors the inverse progress correct', () => {
|
||||
expect(CircleProgress.getProgressColor()).toBe(V1.palette.textVerySubtle);
|
||||
expect(CircleProgress.getProgressColor(10, true)).toBe(COLORS.STATUS.OK);
|
||||
|
||||
Reference in New Issue
Block a user