Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: thoughtbot/capybara-webkit
...
head fork: jkrall/capybara-webkit
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 5 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 7 additions and 1 deletion.
  1. +6 −0 spec/driver_spec.rb
  2. +1 −1  src/capybara.js
View
6 spec/driver_spec.rb
@@ -503,6 +503,7 @@
<form action="/" method="GET">
<input class="watch" type="text"/>
<input class="watch" type="password"/>
+ <input class="watch" type="email"/>
<textarea class="watch"></textarea>
<input class="watch" type="checkbox"/>
<input class="watch" type="radio"/>
@@ -559,6 +560,11 @@
subject.find("//li").map(&:text).should == keyevents
end
+ it "triggers email input events" do
+ subject.find("//input[@type='email']").first.set(newtext)
+ subject.find("//li").map(&:text).should == keyevents
+ end
+
it "triggers radio input events" do
subject.find("//input[@type='radio']").first.set(true)
subject.find("//li").map(&:text).should == %w(click change)
View
2  src/capybara.js
@@ -106,7 +106,7 @@ Capybara = {
set: function(index, value) {
var node = this.nodes[index];
var type = (node.type || node.tagName).toLowerCase();
- if (type == "text" || type == "textarea" || type == "password") {
+ if (type == "text" || type == "textarea" || type == "password" || type == "email") {
this.trigger(index, "focus");
node.value = "";
var maxLength = this.attribute(index, "maxlength"),

No commit comments for this range

Something went wrong with that request. Please try again.