Sha256: 0682b05846874a973379c7344c9aaa0eea84ff53ae8941fc8f62ec193c9ae532

Contents?: true

Size: 1.82 KB

Versions: 24

Compression:

Stored size: 1.82 KB

Contents

require 'test_helper'

class ButtonClickTest < ActionController::IntegrationTest
  # <button type="submit" ...>
  test "should click button with type submit by id" do
    visit buttons_path
    click_button "button_submit_id"
    assert_contain "success"
  end
  test "should click button with type submit by value" do
    visit buttons_path
    click_button "button_submit_value"
    assert_contain "success"
  end
  test "should click button with type submit by html" do
    visit buttons_path
    click_button "button_submit_text"
    assert_contain "success"
  end

  # <button type="image" ...>
  test "should click button with type image by id" do
    visit buttons_path
    click_button "button_image_id"
    assert_contain "success"
  end
  test "should click button with type image by value" do
    visit buttons_path
    click_button "button_image_value"
    assert_contain "success"
  end
  test "should click button with type image by html" do
    visit buttons_path
    click_button "button_image_text"
    assert_contain "success"
  end

  # <input type="submit" ...>
  test "should click input with type submit by id" do
    visit buttons_path
    click_button "input_submit_id"
    assert_contain "success"
  end
  test "should click input with type submit by value" do
    visit buttons_path
    click_button "input_submit_value"
    assert_contain "success"
  end

  # <input type="image" ...>
  test "should click input with type image by id" do
    visit buttons_path
    click_button "input_image_id"
    assert_contain "success"
  end
  test "should click input with type image by value" do
    visit buttons_path
    click_button "input_image_value"
    assert_contain "success"
  end
  test "should click input with type image by alt" do
    visit buttons_path
    click_button "input_image_alt"
    assert_contain "success"
  end
end

Version data entries

24 entries across 24 versions & 12 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/spec/integration/rails/test/integration/button_click_test.rb
indirect-webrat-0.7.5 spec/integration/rails/test/integration/button_click_test.rb
indirect-webrat-0.7.4 spec/integration/rails/test/integration/button_click_test.rb
webrat-0.7.3 spec/integration/rails/test/integration/button_click_test.rb
jbd-webrat-0.7.2.rails3 spec/integration/rails/test/integration/button_click_test.rb
webrat-0.7.2 spec/integration/rails/test/integration/button_click_test.rb
webrat-0.7.2.beta.2 spec/integration/rails/test/integration/button_click_test.rb
mutle-webrat-0.7.2.beta.1 spec/integration/rails/test/integration/button_click_test.rb
thoughtbot-webrat-0.7.2.pre spec/integration/rails/test/integration/button_click_test.rb
webrat-0.7.2.beta.1 spec/integration/rails/test/integration/button_click_test.rb
honkster-webrat-0.7.1.2 spec/integration/rails/test/integration/button_click_test.rb
honkster-webrat-0.7.1.1 spec/integration/rails/test/integration/button_click_test.rb
revo-webrat-0.7.0.1 spec/integration/rails/test/integration/button_click_test.rb
webrat-0.7.1 spec/integration/rails/test/integration/button_click_test.rb
davidtrogers-webrat-0.7.0 spec/integration/rails/test/integration/button_click_test.rb
revo-webrat-0.7.0 spec/integration/rails/test/integration/button_click_test.rb
revo-webrat-0.7.1.pre spec/integration/rails/test/integration/button_click_test.rb
webrat-0.7.0 spec/integration/rails/test/integration/button_click_test.rb
honkster-webrat-0.6.0.10 spec/integration/rails/test/integration/button_click_test.rb
honkster-webrat-0.6.0.9 spec/integration/rails/test/integration/button_click_test.rb