@@ -74,7 +74,7 @@ define([
74
74
. findByCssSelector ( '#url' ) . click ( )
75
75
. end ( )
76
76
// wait a bit
77
- . then ( FunctionalHelpers . visibleByQSA ( '.wc-Form-helpMessage ' ) )
77
+ . then ( FunctionalHelpers . visibleByQSA ( 'label[for=url] + span ' ) )
78
78
. findByXpath ( '//*[@id="js-ReportForm"]/div/form/div[1]/div[2]/div[1]' ) . getAttribute ( 'class' )
79
79
. then ( function ( className ) {
80
80
assert . include ( className , 'js-form-error' ) ;
@@ -94,6 +94,33 @@ define([
94
94
. end ( ) ;
95
95
} ,
96
96
97
+ '(optional) browser + os validation' : function ( ) {
98
+ return this . remote
99
+ . setFindTimeout ( intern . config . wc . pageLoadTimeout )
100
+ . get ( require . toUrl ( url + '?open=1' ) )
101
+ . then ( FunctionalHelpers . visibleByQSA ( '#browser' ) )
102
+ // xpath to the #browser formGroup
103
+ . findByXpath ( '//*[@id="js-ReportForm"]/div/form/div[1]/div[2]/div[2]' ) . getAttribute ( 'class' )
104
+ . then ( function ( className ) {
105
+ assert . include ( className , 'js-no-error' ) ;
106
+ assert . notInclude ( className , 'js-form-error' ) ;
107
+ } )
108
+ . end ( )
109
+ . findByCssSelector ( '#browser' ) . clearValue ( )
110
+ . end ( )
111
+ . findByCssSelector ( '#os' ) . click ( )
112
+ . end ( )
113
+ // wait a bit
114
+ . sleep ( 250 )
115
+ // xpath to the #browser formGroup
116
+ . findByXpath ( '//*[@id="js-ReportForm"]/div/form/div[1]/div[2]/div[2]' ) . getAttribute ( 'class' )
117
+ . then ( function ( className ) {
118
+ assert . notInclude ( className , 'js-form-error' ) ;
119
+ assert . notInclude ( className , 'js-no-error' ) ;
120
+ } )
121
+ . end ( ) ;
122
+ } ,
123
+
97
124
'Problem type validation' : function ( ) {
98
125
return this . remote
99
126
. setFindTimeout ( intern . config . wc . pageLoadTimeout )
0 commit comments