Adds test for data deletion

This commit is contained in:
Sofiya Tepikin
2019-09-14 21:03:03 +02:00
parent 5d436630d3
commit e0091497e4
3 changed files with 17 additions and 1 deletions
@@ -35,9 +35,10 @@ class SymptomView extends Component {
}
componentDidUpdate() {
this.values = this.props.values
const shouldShowDelete = this.checkIfHasValuesToDelete()
if (shouldShowDelete !== this.state.shouldShowDelete) {
this.setState({ shouldShowDelete: this.checkIfHasValuesToDelete() })
this.setState({ shouldShowDelete })
}
}
+1
View File
@@ -12,6 +12,7 @@ export default function DeleteIcon({ handleDelete }) {
<TouchableOpacity
onPress={handleDelete}
style={styles.headerDeleteButton}
testID="deleteIcon"
>
<Icon
name="delete"