@@ -1482,6 +1482,30 @@ def create_screenshot(file, *args)
14821482 expect ( input . text ) . to eq ( "replacement text" )
14831483 end
14841484
1485+ it "sets a date field" do
1486+ input = @session . find ( :css , "#date-field" )
1487+ input . set ( Time . new ( 2000 , 12 , 31 ) )
1488+ expect ( input . value ) . to eq ( "2000-12-31" )
1489+ end
1490+
1491+ it "sets a datetime-local field" do
1492+ input = @session . find ( :css , "#datetime-local-field" )
1493+ input . set ( Time . new ( 2000 , 12 , 31 , 17 , 15 ) )
1494+ expect ( input . value ) . to eq ( Time . new ( 2000 , 12 , 31 , 17 , 15 ) . strftime ( "%Y-%m-%dT%H:%M" ) )
1495+ end
1496+
1497+ it "sets a range field" do
1498+ input = @session . find ( :css , "#range-field" )
1499+ input . set ( 42 )
1500+ expect ( input . value ) . to eq ( "42" )
1501+ end
1502+
1503+ it "sets a color field" do
1504+ input = @session . find ( :css , "#color-field" )
1505+ input . set ( "#1270a4" )
1506+ expect ( input . value ) . to eq ( "#1270a4" )
1507+ end
1508+
14851509 it "sets a content editable childs content" do
14861510 @session . visit ( "/with_js" )
14871511 @session . find ( :css , "#existing_content_editable_child" ) . set ( "WYSIWYG" )
0 commit comments