Ending selenium tests with assertions avoids "test bleed"

This commit is contained in:
Bryan Helmkamp 2009-11-13 21:10:25 -05:00
parent bb282d992e
commit 1ce72b6912
1 changed files with 11 additions and 0 deletions

View File

@ -5,51 +5,62 @@ class ButtonClickTest < ActionController::IntegrationTest
test "should click button with type submit by id" do test "should click button with type submit by id" do
visit buttons_path visit buttons_path
click_button "button_submit_id" click_button "button_submit_id"
assert_contain "success"
end end
test "should click button with type submit by value" do test "should click button with type submit by value" do
visit buttons_path visit buttons_path
click_button "button_submit_value" click_button "button_submit_value"
assert_contain "success"
end end
test "should click button with type submit by html" do test "should click button with type submit by html" do
visit buttons_path visit buttons_path
click_button "button_submit_text" click_button "button_submit_text"
assert_contain "success"
end end
# <button type="image" ...> # <button type="image" ...>
test "should click button with type image by id" do test "should click button with type image by id" do
visit buttons_path visit buttons_path
click_button "button_image_id" click_button "button_image_id"
assert_contain "success"
end end
test "should click button with type image by value" do test "should click button with type image by value" do
visit buttons_path visit buttons_path
click_button "button_image_value" click_button "button_image_value"
assert_contain "success"
end end
test "should click button with type image by html" do test "should click button with type image by html" do
visit buttons_path visit buttons_path
click_button "button_image_text" click_button "button_image_text"
assert_contain "success"
end end
# <input type="submit" ...> # <input type="submit" ...>
test "should click input with type submit by id" do test "should click input with type submit by id" do
visit buttons_path visit buttons_path
click_button "input_submit_id" click_button "input_submit_id"
assert_contain "success"
end end
test "should click input with type submit by value" do test "should click input with type submit by value" do
visit buttons_path visit buttons_path
click_button "input_submit_value" click_button "input_submit_value"
assert_contain "success"
end end
# <input type="image" ...> # <input type="image" ...>
test "should click input with type image by id" do test "should click input with type image by id" do
visit buttons_path visit buttons_path
click_button "input_image_id" click_button "input_image_id"
assert_contain "success"
end end
test "should click input with type image by value" do test "should click input with type image by value" do
visit buttons_path visit buttons_path
click_button "input_image_value" click_button "input_image_value"
assert_contain "success"
end end
test "should click input with type image by alt" do test "should click input with type image by alt" do
visit buttons_path visit buttons_path
click_button "input_image_alt" click_button "input_image_alt"
assert_contain "success"
end end
end end