remove `field_labeled` alias for `find_field`
This commit is contained in:
parent
fe4af9ecc4
commit
5ca348f7d1
|
@ -126,7 +126,6 @@ module Capybara
|
||||||
def find_field(locator = nil, **options, &optional_filter_block)
|
def find_field(locator = nil, **options, &optional_filter_block)
|
||||||
find(:field, locator, options, &optional_filter_block)
|
find(:field, locator, options, &optional_filter_block)
|
||||||
end
|
end
|
||||||
alias_method :field_labeled, :find_field
|
|
||||||
|
|
||||||
##
|
##
|
||||||
#
|
#
|
||||||
|
|
|
@ -40,7 +40,7 @@ module Capybara
|
||||||
|
|
||||||
NODE_METHODS = %i[
|
NODE_METHODS = %i[
|
||||||
all first attach_file text check choose
|
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
|
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_content? has_text? has_css? has_no_content? has_no_text?
|
||||||
has_no_css? has_no_xpath? resolve has_xpath? select uncheck
|
has_no_css? has_no_xpath? resolve has_xpath? select uncheck
|
||||||
|
|
|
@ -41,13 +41,6 @@ Capybara::SpecHelper.spec '#find_field' do
|
||||||
@session.find_field('Dog', disabled: nil)
|
@session.find_field('Dog', disabled: nil)
|
||||||
end
|
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
|
context "with :exact option" do
|
||||||
it "should accept partial matches when false" do
|
it "should accept partial matches when false" do
|
||||||
expect(@session.find_field("Explanation", exact: false)[:name]).to eq("form[name_explanation]")
|
expect(@session.find_field("Explanation", exact: false)[:name]).to eq("form[name_explanation]")
|
||||||
|
|
Loading…
Reference in New Issue