mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Removed set_hidden_field
It's useless and doesn't work on any of the drivers
This commit is contained in:
parent
e2b696a180
commit
f10e5b4f06
3 changed files with 1 additions and 18 deletions
|
@ -33,7 +33,7 @@ module Webcat
|
|||
|
||||
SESSION_METHODS = [
|
||||
:visit, :body, :click_link, :click_button, :fill_in, :choose,
|
||||
:set_hidden_field, :check, :uncheck, :attach_file, :select, :has_content?
|
||||
:check, :uncheck, :attach_file, :select, :has_content?
|
||||
]
|
||||
SESSION_METHODS.each do |method|
|
||||
class_eval <<-RUBY, __FILE__, __LINE__+1
|
||||
|
|
|
@ -39,10 +39,6 @@ class Webcat::Session
|
|||
find_field(locator, :radio).set(true)
|
||||
end
|
||||
|
||||
def set_hidden_field(locator, options={})
|
||||
find_field(locator, :hidden_field).set(options[:to])
|
||||
end
|
||||
|
||||
def check(locator)
|
||||
find_field(locator, :checkbox).set(true)
|
||||
end
|
||||
|
|
|
@ -213,19 +213,6 @@ shared_examples_for "session" do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#set_hidden_field" do
|
||||
before do
|
||||
@session.visit('/form')
|
||||
end
|
||||
|
||||
it "should set a hidden field by id" do
|
||||
pending "Culerity doesn't like hidden fields for some reason" if @session.mode == :culerity
|
||||
@session.set_hidden_field("form_token", :to => 'test567')
|
||||
@session.click_button('awesome')
|
||||
extract_results(@session)['token'].should == 'test567'
|
||||
end
|
||||
end
|
||||
|
||||
describe "#check" do
|
||||
before do
|
||||
@session.visit('/form')
|
||||
|
|
Loading…
Add table
Reference in a new issue