Add spec for finding inputs by alt text
This commit is contained in:
parent
0fdd3375c7
commit
2c238902d6
2
Rakefile
2
Rakefile
@ -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"
|
||||||
|
@ -333,6 +333,16 @@ describe "clicks_button" do
|
|||||||
@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
|
||||||
<form method="get" action="/login">
|
<form method="get" action="/login">
|
||||||
|
Loading…
Reference in New Issue
Block a user