Spec example for XPath.button was added

This commit is contained in:
Pavel Gabriel 2010-02-19 01:19:21 +02:00
parent 2f314f01d3
commit f1b84510b3
1 changed files with 13 additions and 0 deletions

View File

@ -155,6 +155,19 @@ describe Capybara::XPath do
@driver.find(@query).first.value.should == 'seeekrit'
end
end
describe '#button' do
it "should find a button by id or content" do
@query = @xpath.button('awe123').to_s
@driver.find(@query).first.value.should == 'awesome'
@query = @xpath.button('okay556').to_s
@driver.find(@query).first.value.should == 'okay'
@query = @xpath.button('click_me_123').to_s
@driver.find(@query).first.value.should == 'click_me'
@query = @xpath.button('Click me!').to_s
@driver.find(@query).first.value.should == 'click_me'
end
end
describe '#radio_button' do
it "should find a radio button by id or label" do