remove `field_labeled` alias for `find_field`

This commit is contained in:
Thomas Walpole 2018-01-10 16:47:39 -08:00
parent fe4af9ecc4
commit 5ca348f7d1
3 changed files with 1 additions and 9 deletions

View File

@ -126,7 +126,6 @@ module Capybara
def find_field(locator = nil, **options, &optional_filter_block)
find(:field, locator, options, &optional_filter_block)
end
alias_method :field_labeled, :find_field
##
#

View File

@ -40,7 +40,7 @@ module Capybara
NODE_METHODS = %i[
all first attach_file text check choose
click_link_or_button click_button click_link field_labeled
click_link_or_button click_button click_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

View File

@ -41,13 +41,6 @@ Capybara::SpecHelper.spec '#find_field' do
@session.find_field('Dog', disabled: nil)
end
it "should be aliased as 'field_labeled' for webrat compatibility" do
expect(@session.field_labeled('Dog').value).to eq('dog')
expect do
@session.field_labeled('Does not exist')
end.to raise_error(Capybara::ElementNotFound)
end
context "with :exact option" do
it "should accept partial matches when false" do
expect(@session.find_field("Explanation", exact: false)[:name]).to eq("form[name_explanation]")