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:
parent
c9ab7afe5f
commit
ed56bc7cba
3 changed files with 16 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue