mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
disabled inputs/selects/textareas are not put in params for the rack driver
This commit is contained in:
parent
41b3a0ac4c
commit
21a1e788b4
2 changed files with 53 additions and 0 deletions
|
@ -99,6 +99,15 @@ shared_examples_for "click_button" do
|
|||
it "should not serialize a select tag without options" do
|
||||
@results['tendency'].should be_nil
|
||||
end
|
||||
|
||||
it "should not submit disabled fields" do
|
||||
@results['disabled_text_field'].should be_nil
|
||||
@results['disabled_textarea'].should be_nil
|
||||
@results['disabled_checkbox'].should be_nil
|
||||
@results['disabled_radio'].should be_nil
|
||||
@results['disabled_select'].should be_nil
|
||||
@results['disabled_file'].should be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -165,6 +165,50 @@
|
|||
</label>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<label for="form_disabled_text_field">
|
||||
Disabled Text Field
|
||||
<input type="text" name="form[disabled_text_field]" value="Should not see me" id="form_disabled_text_field" disabled="disabled" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="form_disabled_textarea">
|
||||
Disabled Textarea
|
||||
<textarea name="form[disabled_textarea]" value="Should not see me" id="form_disabled_textarea" disabled="disabled" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="form_disabled_checkbox">
|
||||
Disabled Checkbox
|
||||
<input type="checkbox" name="form[disabled_checkbox]" value="Should not see me" id="form_disabled_checkbox" checked="checked" disabled="disabled" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="form_disabled_radio">
|
||||
Disabled Checkbox
|
||||
<input type="radio" name="form[disabled_radio]" value="Should not see me" id="form_disabled_radio" checked="checked" disabled="disabled" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="form_disabled_select">
|
||||
Disabled Select
|
||||
<select name="form[disabled_select]" id="form_disabled_select" disabled="disabled">
|
||||
<option value="Should not see me" selected="selected">Should not see me</option>
|
||||
</select>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="form_disabled_file">
|
||||
Disabled File
|
||||
<input type="file" name="form[disabled_file]" value="/should/not/see/me" id="form_disabled_file" disabled="disabled" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input type="button" name="form[fresh]" id="fresh_btn" value="i am fresh"/>
|
||||
<input type="submit" name="form[awesome]" id="awe123" value="awesome"/>
|
||||
|
|
Loading…
Reference in a new issue