1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/spec/dsl/uncheck_spec.rb
Jonas Nicklas cbe2f07331 Merging Andrea's hidden elements branch with some changes
Interacting with hidden elements shouldn't raise errors
when ignore_hidden_elements is false

ignore_hidden_elements is false by default

Merge remote branch 'remogatto/interact_with_visible_only'

Conflicts:
	lib/capybara.rb
	lib/capybara/session.rb
	spec/drivers_spec.rb
	spec/dsl/choose_spec.rb
	spec/dsl/click_button_spec.rb
	spec/dsl/click_link_spec.rb
	spec/dsl/click_spec.rb
	spec/dsl/fill_in_spec.rb
	spec/dsl/locate_spec.rb
	spec/dsl/select_spec.rb
	spec/dsl/uncheck_spec.rb
	spec/views/with_html.erb
2010-01-30 19:07:54 +01:00

21 lines
651 B
Ruby

shared_examples_for "uncheck" do
describe "#uncheck" do
before do
@session.visit('/form')
end
it "should uncheck a checkbox by id" do
@session.uncheck("form_pets_hamster")
@session.click_button('awesome')
extract_results(@session)['pets'].should include('dog')
extract_results(@session)['pets'].should_not include('hamster')
end
it "should uncheck a checkbox by label" do
@session.uncheck("Hamster")
@session.click_button('awesome')
extract_results(@session)['pets'].should include('dog')
extract_results(@session)['pets'].should_not include('hamster')
end
end
end