add disabled test for option in optgroup in disabled select

This commit is contained in:
Thomas Walpole 2017-01-03 10:10:52 -08:00
parent e77471edc4
commit fd11473bc8
2 changed files with 4 additions and 0 deletions

View File

@ -166,6 +166,7 @@ Capybara::SpecHelper.spec "node" do
it "should see enabled options in disabled select as disabled" do
@session.visit('/form')
expect(@session.find('//select[@id="form_disabled_select"]/option')).to be_disabled
expect(@session.find('//select[@id="form_disabled_select"]/optgroup/option')).to be_disabled
expect(@session.find('//select[@id="form_title"]/option[1]')).not_to be_disabled
end

View File

@ -322,6 +322,9 @@ New line after and before textarea tag
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>
<optgroup>
<option value="Disabled too">Disabled too</option>
</optgroup>
</select>
</label>
</p>