Skip to content

Commit ff7b308

Browse files
committed
Add failing spec for color input
At present when attempting to set a value on a color input, the value is always set to "#000000" not matter what value you attempt to set it to.
1 parent 0f5b3ea commit ff7b308

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

spec/integration/session_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@
241241
FileUtils.rm_f(filename)
242242
end
243243
end
244+
245+
it "sets a value for a color input" do
246+
element = @session.find(:css, "#change_me_color")
247+
element.set("#ddeeff")
248+
expect(element.value).to eq("#ddeeff")
249+
end
244250
end
245251

246252
describe "Node#visible" do

spec/support/views/with_js.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<input type="text" name="change_me_withname" id="change_me_withname">
3939
</p>
4040
<p><input type="file" name="change_me_file" id="change_me_file"></p>
41+
<p><input type="color" name="change_me_color" id="change_me_color"></p>
4142
<p id="changes"></p>
4243
<p id="changes_on_input"></p>
4344
<p id="changes_on_keydown"></p>

0 commit comments

Comments
 (0)