@@ -51,10 +51,10 @@ describe('e2e tests', () => {
51
51
}
52
52
} ) ;
53
53
54
- it ( 'nothing should happen if date does not change' , async ( ) => {
55
- if ( isIOS ( ) ) {
56
- await userOpensPicker ( { mode : 'date' , display : 'compact' } ) ;
54
+ it ( 'nothing should happen if picker is dismissed / cancelled' , async ( ) => {
55
+ await userOpensPicker ( { mode : 'date' , display : 'default' } ) ;
57
56
57
+ if ( isIOS ( ) ) {
58
58
await element (
59
59
by . traits ( [ 'staticText' ] ) . withAncestor ( by . label ( 'Date Picker' ) ) ,
60
60
) . tap ( ) ;
@@ -65,7 +65,6 @@ describe('e2e tests', () => {
65
65
await nextMonthArrow . tap ( ) ;
66
66
await userDismissesCompactDatePicker ( ) ;
67
67
} else {
68
- await userOpensPicker ( { mode : 'date' , display : 'default' } ) ;
69
68
const calendarHorizontalScrollView = element (
70
69
by
71
70
. type ( 'android.widget.ScrollView' )
@@ -76,6 +75,7 @@ describe('e2e tests', () => {
76
75
await userTapsCancelButtonAndroid ( ) ;
77
76
}
78
77
78
+ await elementByText ( 'great' ) . tap ( ) ;
79
79
await expect ( getDateText ( ) ) . toHaveText ( '11/13/2021' ) ;
80
80
} ) ;
81
81
@@ -123,6 +123,7 @@ describe('e2e tests', () => {
123
123
} else {
124
124
await userChangesTimeValue ( { minutes : '22' } ) ;
125
125
await userTapsCancelButtonAndroid ( ) ;
126
+ await elementByText ( 'great' ) . tap ( ) ;
126
127
}
127
128
await expect ( getTimeText ( ) ) . toHaveText ( '11:00' ) ;
128
129
} ) ;
0 commit comments