Add mock for getCycleDay
This commit is contained in:
@@ -9,6 +9,7 @@ import styles from './styles'
|
||||
import { saveBleeding } from './db'
|
||||
import { formatDateForViewHeader } from './format'
|
||||
import { bleeding as labels } from './labels'
|
||||
import getCycleDay from './get-cycle-day'
|
||||
|
||||
export default class Bleeding extends Component {
|
||||
constructor(props) {
|
||||
@@ -27,6 +28,7 @@ export default class Bleeding extends Component {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.welcome}>{formatDateForViewHeader(day.date)}</Text>
|
||||
<Text>Cycle day {getCycleDay()}</Text>
|
||||
<Text>Bleeding</Text>
|
||||
<Picker
|
||||
selectedValue={this.state.currentValue}
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
import styles from './styles'
|
||||
import { formatDateForViewHeader } from './format'
|
||||
import { bleeding as labels} from './labels'
|
||||
import getCycleDay from './get-cycle-day'
|
||||
|
||||
export default class DayView extends Component {
|
||||
constructor(props) {
|
||||
@@ -30,6 +31,7 @@ export default class DayView extends Component {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.welcome}>{formatDateForViewHeader(day.date)}</Text>
|
||||
<Text>Cycle day {getCycleDay()}</Text>
|
||||
<Text style={styles.welcome}>{bleedingLabel}</Text>
|
||||
<Button
|
||||
onPress={() => navigate('bleeding', { cycleDay: day })}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export default () => 6
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
Text
|
||||
} from 'react-native'
|
||||
import styles from './styles'
|
||||
import getCycleDay from './get-cycle-day'
|
||||
|
||||
export default class Home extends Component {
|
||||
constructor(props) {
|
||||
@@ -15,7 +16,7 @@ export default class Home extends Component {
|
||||
const navigate = this.props.navigation.navigate
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.welcome}>Welcome! Today is day 6 of your current cycle</Text>
|
||||
<Text style={styles.welcome}>Welcome! Today is day {getCycleDay()} of your current cycle</Text>
|
||||
<Button
|
||||
onPress={() => navigate('temperatureList')}
|
||||
title="Edit symptoms for today">
|
||||
|
||||
Reference in New Issue
Block a user