mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Merge pull request #1509 from jnicklas/find_all
add #find_all as an alias of #all - Issue #1396
This commit is contained in:
commit
dedd8711dc
3 changed files with 7 additions and 1 deletions
|
@ -153,6 +153,7 @@ module Capybara
|
|||
result
|
||||
end
|
||||
end
|
||||
alias_method :find_all, :all
|
||||
|
||||
##
|
||||
#
|
||||
|
|
|
@ -27,7 +27,7 @@ module Capybara
|
|||
NODE_METHODS = [
|
||||
:all, :first, :attach_file, :text, :check, :choose,
|
||||
:click_link_or_button, :click_button, :click_link, :field_labeled,
|
||||
:fill_in, :find, :find_button, :find_by_id, :find_field, :find_link,
|
||||
:fill_in, :find, :find_all, :find_button, :find_by_id, :find_field, :find_link,
|
||||
:has_content?, :has_text?, :has_css?, :has_no_content?, :has_no_text?,
|
||||
:has_no_css?, :has_no_xpath?, :resolve, :has_xpath?, :select, :uncheck,
|
||||
:has_link?, :has_no_link?, :has_button?, :has_no_button?, :has_field?,
|
||||
|
|
|
@ -149,4 +149,9 @@ Capybara::SpecHelper.spec "#all" do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
it "should have #find_all as an alias" do
|
||||
expect(Capybara::Node::Finders.instance_method(:all)).to eq Capybara::Node::Finders.instance_method(:find_all)
|
||||
expect(@session.find_all('//p').size).to eq(3)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue