Adds initial tests
This commit is contained in:
@@ -13,9 +13,9 @@ export default function BackButtonHeader(props) {
|
||||
style={styles.accentCircle}
|
||||
left={props.middle - styles.accentCircle.width / 2}
|
||||
/>
|
||||
<NavigationArrow direction='left' {...props}/>
|
||||
<NavigationArrow testID='backButton' direction='left' {...props}/>
|
||||
<View>
|
||||
<Text style={styles.headerText}>
|
||||
<Text style={styles.headerText} testID='pageTitle'>
|
||||
{props.title}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function CycleDayHeader({ date, ...props }) {
|
||||
/>
|
||||
<NavigationArrow direction='left' {...props}/>
|
||||
<View>
|
||||
<Text style={styles.dateHeader}>
|
||||
<Text style={styles.dateHeader} testID='cycleDayTitleDate'>
|
||||
{formatDate(date)}
|
||||
</Text>
|
||||
{props.cycleDayNumber &&
|
||||
|
||||
@@ -25,6 +25,7 @@ export default function NavigationArrow(props) {
|
||||
<TouchableOpacity
|
||||
style={[styles.navigationArrow, styles[iconPosition]]}
|
||||
onPress={pressHandler}
|
||||
testID={props.testID}
|
||||
>
|
||||
<Icon
|
||||
name={iconName}
|
||||
|
||||
@@ -23,10 +23,10 @@ export default function SymptomViewHeader(props) {
|
||||
{...props}
|
||||
/>
|
||||
<View>
|
||||
<Text style={styles.dateHeader}>
|
||||
<Text style={styles.dateHeader} testID='symptomViewTitleName'>
|
||||
{props.title}
|
||||
</Text>
|
||||
<Text style={styles.cycleDayNumber}>
|
||||
<Text style={styles.cycleDayNumber} testID='symptomViewTitleDate'>
|
||||
{formatDate(props.date)}
|
||||
</Text>
|
||||
</View >
|
||||
|
||||
Reference in New Issue
Block a user