Adding unit tests to all possible mucus feeling/texture combinations

This commit is contained in:
emelko
2018-07-04 22:54:06 +02:00
parent 9ab4bd0dfa
commit 7e0456c10f
3 changed files with 98 additions and 1 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ import {
mucusFeeling as feelingLabels,
mucusTexture as textureLabels
} from '../labels/labels'
import computeSensiplanValue from '../lib/sensiplan-mucus'
export default class Mucus extends Component {
constructor(props) {
@@ -137,11 +138,11 @@ export default class Mucus extends Component {
saveMucus(this.cycleDay, {
feeling: this.state.currentFeelingValue,
texture: this.state.currentTextureValue,
computedValue: computeSensiplanValue(this.state.currentFeelingValue, this.state.currentTextureValue),
exclude: this.state.exclude
})
this.showView('dayView')
}}
// FIXME: find out how disabled works when 2 values need to be checked
disabled={ this.state.currentFeelingValue === -1 || this.state.currentTextureValue === -1 }
title="Save">
</Button>