[#257 state:awaiting-patch] here is a test proving the issue
This commit is contained in:
parent
2704609224
commit
bd1655c8e2
@ -0,0 +1,4 @@
|
|||||||
|
class FieldsController < ApplicationController
|
||||||
|
def show
|
||||||
|
end
|
||||||
|
end
|
2
spec/integration/rails/app/helpers/fields_helper.rb
Normal file
2
spec/integration/rails/app/helpers/fields_helper.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
module FieldsHelper
|
||||||
|
end
|
8
spec/integration/rails/app/views/fields/show.html.erb
Normal file
8
spec/integration/rails/app/views/fields/show.html.erb
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<h1>Webrat Fields Page</h1>
|
||||||
|
<h2>Filling In</h2>
|
||||||
|
<ul>
|
||||||
|
<li><input type="text" name="field_by_name" value="" /></li>
|
||||||
|
<li><input type="text" name="rails[naming]" value="" /></li>
|
||||||
|
<li><input type="text" id="field_by_id" value="" /></li>
|
||||||
|
<li><label for="field_by_label_id">FieldByLabelId</label><input type="text" id="field_by_label_id" /></li>
|
||||||
|
</ul>
|
@ -1,6 +1,7 @@
|
|||||||
ActionController::Routing::Routes.draw do |map|
|
ActionController::Routing::Routes.draw do |map|
|
||||||
map.resource 'links', :only => [:show]
|
map.resource 'links', :only => [:show]
|
||||||
map.resource 'buttons', :only => [:show, :create]
|
map.resource 'buttons', :only => [:show, :create]
|
||||||
|
map.resource 'fields', :only => [:show]
|
||||||
map.with_options :controller => "webrat" do |webrat|
|
map.with_options :controller => "webrat" do |webrat|
|
||||||
webrat.submit "/submit", :action => "submit"
|
webrat.submit "/submit", :action => "submit"
|
||||||
webrat.internal_redirect "/internal_redirect", :action => "internal_redirect"
|
webrat.internal_redirect "/internal_redirect", :action => "internal_redirect"
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class ButtonsControllerTest < ActionController::TestCase
|
|
||||||
# Replace this with your real tests.
|
|
||||||
test "the truth" do
|
|
||||||
assert true
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,8 +0,0 @@
|
|||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class LinksControllerTest < ActionController::TestCase
|
|
||||||
# Replace this with your real tests.
|
|
||||||
test "the truth" do
|
|
||||||
assert true
|
|
||||||
end
|
|
||||||
end
|
|
20
spec/integration/rails/test/integration/fill_in_test.rb
Normal file
20
spec/integration/rails/test/integration/fill_in_test.rb
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class FillInTest < ActionController::IntegrationTest
|
||||||
|
test "should fill in text field by name" do
|
||||||
|
visit fields_path
|
||||||
|
fill_in "field_by_name", :with => "value"
|
||||||
|
end
|
||||||
|
test "should fill in text field by name, rails naming lh257" do
|
||||||
|
visit fields_path
|
||||||
|
fill_in "rails[naming]", :with => "value"
|
||||||
|
end
|
||||||
|
test "should fill in text field by id" do
|
||||||
|
visit fields_path
|
||||||
|
fill_in "field_by_id", :with => "value"
|
||||||
|
end
|
||||||
|
test "should fill in text field by label via id" do
|
||||||
|
visit fields_path
|
||||||
|
fill_in "FieldByLabelId", :with => "value"
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user