HTML5 email input field types should work the same as text fields #106

Closed
wants to merge 4 commits into
from

2 participants

@jkrall

Small, obvious, patch. Enjoy!

@jkrall

Just realized, this closes #46

@mike-burns
thoughtbot, inc. member

Hi @jkrall, good catch! Can you add a test for this? As an example, see spec/driver_spec.rb line 469.

Thanks,
-Mike

@mike-burns mike-burns commented on the diff Jul 19, 2011
lib/capybara/driver/webkit/browser.rb
@@ -53,7 +53,9 @@ class Capybara::Driver::Webkit
@socket.puts arg.to_s.bytesize
@socket.print arg.to_s
end
- check
+ 3.times do
+ break unless check.blank?
+ end
@mike-burns
thoughtbot, inc. member
mike-burns added a line comment Jul 19, 2011

What's this? The 3.times thing is new in this commit?

@jkrall
jkrall added a line comment Jul 22, 2011

Yeah... apologies for this. You should probably disregard this pull request. I was experimenting with retry-logic under the theory that the problem was the webkit browser taking longer than expected to return a non-nil response... and I did this ugly hack to test that theory. It worked at first, so I left it in there, but I later found out the problem was more complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@mike-burns mike-burns commented on the diff Jul 19, 2011
lib/capybara/driver/webkit/browser.rb
@@ -113,9 +115,7 @@ class Capybara::Driver::Webkit
result = @socket.gets
result.strip! if result
- if result.nil?
- raise WebkitNoResponseError, "No response received from the server."
- elsif result != 'ok'
+ if result != 'ok'
@mike-burns
thoughtbot, inc. member
mike-burns added a line comment Jul 19, 2011

This gets rid of handling non-responses from servers. Any reason?

@jkrall
jkrall added a line comment Jul 22, 2011

See my note above... again, this was because I thought a nil-response might have meant the server just wasn't ready. In fact, it seems to meant that the socket has been closed/server-died... so this shouldn't be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jkrall jkrall closed this Jul 22, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment