Fix progess test

This commit is contained in:
Fredrik Adelöw
2020-03-13 08:39:49 +01:00
parent e1565289b7
commit 9cca522c43
2 changed files with 3 additions and 2 deletions
@@ -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);