File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 8
8
goog . require ( 'goog.Promise' ) ;
9
9
goog . require ( 'goog.Uri' ) ;
10
10
goog . require ( 'goog.dom' ) ;
11
+ goog . require ( 'goog.dom.forms' ) ;
11
12
goog . require ( 'goog.events' ) ;
12
13
goog . require ( 'goog.events.EventType' ) ;
13
14
goog . require ( 'goog.testing.jsunit' ) ;
180
181
assertEquals ( '' , e . value ) ;
181
182
}
182
183
184
+ function testClearingNumberInputWithInvalidData ( ) {
185
+ var e = goog . dom . getElement ( 'numberField' ) ;
186
+ bot . action . type ( e , "e" ) ;
187
+ bot . action . clear ( e ) ;
188
+ bot . action . type ( e , "3" ) ;
189
+ assertEquals ( "3" , goog . dom . forms . getValue ( e ) ) ;
190
+ }
191
+
183
192
function testSubmittingANonFormElementShouldResultInAnError ( ) {
184
193
assertThrows ( goog . partial ( bot . action . submit , document . body ) ) ;
185
194
}
266
275
< label for ="fileField "> File field</ label >
267
276
< input type ="file " id ="fileField ">
268
277
</ div >
278
+ < div >
279
+ < label for ="numberField "> Number field</ label >
280
+ < input type ="number " id ="numberField ">
281
+ </ div >
269
282
</ form >
270
283
271
284
< div id ="log ">
You can’t perform that action at this time.
0 commit comments