Add spec for finding inputs by alt text

This commit is contained in:
Bryan Helmkamp 2008-07-25 18:48:53 -04:00
parent 0fdd3375c7
commit 2c238902d6
2 changed files with 11 additions and 1 deletions

View File

@ -56,7 +56,7 @@ end
require 'spec/rake/verify_rcov' require 'spec/rake/verify_rcov'
RCov::VerifyTask.new(:verify_rcov => :rcov) do |t| RCov::VerifyTask.new(:verify_rcov => :rcov) do |t|
t.threshold = 97.2 # Make sure you have rcov 0.7 or higher! t.threshold = 97.3 # Make sure you have rcov 0.7 or higher!
end end
remove_task "default" remove_task "default"

View File

@ -332,6 +332,16 @@ describe "clicks_button" do
@session.expects(:get) @session.expects(:get)
@session.clicks_button @session.clicks_button
end end
it "should find image buttons by their alt text" do
@session.response_body = <<-EOS
<form action="/">
<input type="image" alt="Go" />
</form>
EOS
@session.expects(:get)
@session.clicks_button "Go"
end
it "should recognize button tags by content" do it "should recognize button tags by content" do
@session.response_body = <<-EOS @session.response_body = <<-EOS