@@ -12,65 +12,65 @@ describe('dpDayPicker timePicker', () => {
12
12
page . dateFormatInput . sendKeys ( 'HH:mm:ss' ) ;
13
13
} ) ;
14
14
15
- it ( 'should check if min time validation is working' , ( ) => {
15
+ it ( 'should check if min time validation is working' , async ( ) => {
16
16
page . minTimeValidationPickerInput . clear ( ) ;
17
- expect ( page . timePickerMinTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
17
+ expect ( await page . timePickerMinTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
18
18
page . minTimeValidationPickerInput . clear ( ) ;
19
19
page . minTimeValidationPickerInput . sendKeys ( '10:11:12' ) ;
20
20
page . timePickerInput . click ( ) ;
21
21
page . timePickerInput . clear ( ) ;
22
22
page . timePickerInput . sendKeys ( '09:00:00' ) ;
23
23
page . clickOnBody ( ) ;
24
- expect ( page . timePickerMinTimeValidationMsg . getText ( ) ) . toEqual ( 'minTime invalid' ) ;
24
+ expect ( await page . timePickerMinTimeValidationMsg . getText ( ) ) . toEqual ( 'minTime invalid' ) ;
25
25
page . minTimeValidationPickerInput . clear ( ) ;
26
26
page . minTimeValidationPickerInput . sendKeys ( '08:07:06' ) ;
27
27
page . clickOnBody ( ) ;
28
- expect ( page . timePickerMinTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
28
+ expect ( await page . timePickerMinTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
29
29
} ) ;
30
30
31
- it ( 'should check if max time validation is working' , ( ) => {
31
+ it ( 'should check if max time validation is working' , async ( ) => {
32
32
page . maxTimeValidationPickerInput . click ( ) ;
33
33
page . maxTimeValidationPickerInput . clear ( ) ;
34
- expect ( page . timePickerMaxTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
34
+ expect ( await page . timePickerMaxTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
35
35
page . maxTimeValidationPickerInput . clear ( ) ;
36
36
page . maxTimeValidationPickerInput . sendKeys ( '08:07:06' ) ;
37
37
page . timePickerInput . click ( ) ;
38
38
page . timePickerInput . clear ( ) ;
39
39
page . timePickerInput . sendKeys ( '09:00:00' ) ;
40
40
page . clickOnBody ( ) ;
41
- expect ( page . timePickerMaxTimeValidationMsg . getText ( ) ) . toEqual ( 'maxTime invalid' ) ;
41
+ expect ( await page . timePickerMaxTimeValidationMsg . getText ( ) ) . toEqual ( 'maxTime invalid' ) ;
42
42
page . maxTimeValidationPickerInput . clear ( ) ;
43
43
page . maxTimeValidationPickerInput . sendKeys ( '10:11:12' ) ;
44
- expect ( page . timePickerMaxTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
44
+ expect ( await page . timePickerMaxTimeValidationMsg . isPresent ( ) ) . toBe ( false ) ;
45
45
} ) ;
46
46
47
- it ( 'should check that the min selectable time option is working' , ( ) => {
47
+ it ( 'should check that the min selectable time option is working' , async ( ) => {
48
48
page . minTimeInput . click ( ) ;
49
49
page . minTimeInput . clear ( ) ;
50
50
page . minTimeInput . sendKeys ( '08:07:06' ) ;
51
51
page . timePickerInput . click ( ) ;
52
52
page . timePickerInput . clear ( ) ;
53
53
page . timePickerInput . sendKeys ( '09:00:00' ) ;
54
- expect ( page . hourDownBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
55
- expect ( page . minuteDownBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
56
- expect ( page . meridiemUpBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
57
- expect ( page . meridiemDownBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
54
+ expect ( await page . hourDownBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
55
+ expect ( await page . minuteDownBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
56
+ expect ( await page . meridiemUpBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
57
+ expect ( await page . meridiemDownBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
58
58
} ) ;
59
59
60
- it ( 'should check that the max selectable time option is working' , ( ) => {
60
+ it ( 'should check that the max selectable time option is working' , async ( ) => {
61
61
page . maxTimeInput . click ( ) ;
62
62
page . maxTimeInput . clear ( ) ;
63
63
page . maxTimeInput . sendKeys ( '09:07:06' ) ;
64
64
page . timePickerInput . click ( ) ;
65
65
page . timePickerInput . clear ( ) ;
66
66
page . timePickerInput . sendKeys ( '09:00:00' ) ;
67
- expect ( page . hourUpBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
68
- expect ( page . minuteUpBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
69
- expect ( page . meridiemUpBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
70
- expect ( page . meridiemDownBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
67
+ expect ( await page . hourUpBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
68
+ expect ( await page . minuteUpBtn . getAttribute ( 'disabled' ) ) . toBe ( null ) ;
69
+ expect ( await page . meridiemUpBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
70
+ expect ( await page . meridiemDownBtn . getAttribute ( 'disabled' ) ) . toEqual ( 'true' ) ;
71
71
} ) ;
72
72
73
- it ( 'should check that the 12 hour time format options work' , ( ) => {
73
+ it ( 'should check that the 12 hour time format options work' , async ( ) => {
74
74
page . showSeconds . click ( ) ;
75
75
page . hours12FormatInput . clear ( ) ;
76
76
page . hours12FormatInput . sendKeys ( 'h' ) ;
@@ -85,14 +85,14 @@ describe('dpDayPicker timePicker', () => {
85
85
page . timePickerInput . click ( ) ;
86
86
page . timePickerInput . clear ( ) ;
87
87
page . timePickerInput . sendKeys ( '09:08:07' ) ;
88
- expect ( page . hourDisplay . getText ( ) ) . toEqual ( '9' ) ;
89
- expect ( page . minuteDisplay . getText ( ) ) . toEqual ( '8' ) ;
90
- expect ( page . secondDisplay . getText ( ) ) . toEqual ( '7' ) ;
91
- expect ( page . meridiemDisplay . getText ( ) ) . toEqual ( 'am' ) ;
92
- expect ( page . timeSeparatorDisplay . getText ( ) ) . toEqual ( '-' ) ;
88
+ expect ( await page . hourDisplay . getText ( ) ) . toEqual ( '9' ) ;
89
+ expect ( await page . minuteDisplay . getText ( ) ) . toEqual ( '8' ) ;
90
+ expect ( await page . secondDisplay . getText ( ) ) . toEqual ( '7' ) ;
91
+ expect ( await page . meridiemDisplay . getText ( ) ) . toEqual ( 'am' ) ;
92
+ expect ( await page . timeSeparatorDisplay . getText ( ) ) . toEqual ( '-' ) ;
93
93
} ) ;
94
94
95
- it ( 'should check that the 24 hour time format options work' , ( ) => {
95
+ it ( 'should check that the 24 hour time format options work' , async ( ) => {
96
96
page . showTwentyFourHours . click ( ) ;
97
97
page . showSeconds . click ( ) ;
98
98
page . hours24FormatInput . clear ( ) ;
@@ -106,13 +106,13 @@ describe('dpDayPicker timePicker', () => {
106
106
page . timePickerInput . click ( ) ;
107
107
page . timePickerInput . clear ( ) ;
108
108
page . timePickerInput . sendKeys ( '09:08:07' ) ;
109
- expect ( page . hourDisplay . getText ( ) ) . toEqual ( '9' ) ;
110
- expect ( page . minuteDisplay . getText ( ) ) . toEqual ( '8' ) ;
111
- expect ( page . secondDisplay . getText ( ) ) . toEqual ( '7' ) ;
112
- expect ( page . timeSeparatorDisplay . getText ( ) ) . toEqual ( '-' ) ;
109
+ expect ( await page . hourDisplay . getText ( ) ) . toEqual ( '9' ) ;
110
+ expect ( await page . minuteDisplay . getText ( ) ) . toEqual ( '8' ) ;
111
+ expect ( await page . secondDisplay . getText ( ) ) . toEqual ( '7' ) ;
112
+ expect ( await page . timeSeparatorDisplay . getText ( ) ) . toEqual ( '-' ) ;
113
113
} ) ;
114
114
115
- it ( 'should check that the interval options work' , ( ) => {
115
+ it ( 'should check that the interval options work' , async ( ) => {
116
116
page . showSeconds . click ( ) ;
117
117
page . minutesIntervalInput . clear ( ) ;
118
118
page . minutesIntervalInput . sendKeys ( '6' ) ;
@@ -122,16 +122,16 @@ describe('dpDayPicker timePicker', () => {
122
122
page . timePickerInput . clear ( ) ;
123
123
page . timePickerInput . sendKeys ( '09:08:07' ) ;
124
124
page . minuteUpBtn . click ( ) ;
125
- expect ( page . minuteDisplay . getText ( ) ) . toEqual ( '14' ) ;
126
- expect ( page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:14:07' ) ;
125
+ expect ( await page . minuteDisplay . getText ( ) ) . toEqual ( '14' ) ;
126
+ expect ( await page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:14:07' ) ;
127
127
page . minuteDownBtn . click ( ) ;
128
- expect ( page . minuteDisplay . getText ( ) ) . toEqual ( '08' ) ;
129
- expect ( page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:08:07' ) ;
128
+ expect ( await page . minuteDisplay . getText ( ) ) . toEqual ( '08' ) ;
129
+ expect ( await page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:08:07' ) ;
130
130
page . secondUpBtn . click ( ) ;
131
- expect ( page . secondDisplay . getText ( ) ) . toEqual ( '14' ) ;
132
- expect ( page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:08:14' ) ;
131
+ expect ( await page . secondDisplay . getText ( ) ) . toEqual ( '14' ) ;
132
+ expect ( await page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:08:14' ) ;
133
133
page . secondDownBtn . click ( ) ;
134
- expect ( page . secondDisplay . getText ( ) ) . toEqual ( '07' ) ;
135
- expect ( page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:08:07' ) ;
134
+ expect ( await page . secondDisplay . getText ( ) ) . toEqual ( '07' ) ;
135
+ expect ( await page . timePickerInput . getAttribute ( 'value' ) ) . toEqual ( '09:08:07' ) ;
136
136
} ) ;
137
137
} ) ;
0 commit comments