1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Fix buttons specs in order to test the effect of a button's click

Add support for button tag in Driver::RackTest#click
This commit is contained in:
Andrea Fazzi 2009-11-29 23:06:44 +01:00
parent c9ab7afe5f
commit ed56bc7cba
3 changed files with 16 additions and 26 deletions

View file

@ -37,7 +37,7 @@ class Capybara::Driver::RackTest
def click
if tag_name == 'a'
driver.visit(self[:href])
elsif tag_name == 'input' and %w(submit image).include?(type)
elsif (tag_name == 'input' or tag_name == 'button') and %w(submit image).include?(type)
Form.new(driver, form).submit(self)
end
end