Capybara/Formulaic doesn't find input as: :radio_button
Opened this issue · 1 comments
Rogerio commented
I have an simple_form input that maps to a string attribute, since I want the user to select from fixed options I'm using it as radio_buttons:
<%= s.input :sex, collection: [['M','Male'] ,['F', 'Female']], as: :radio_buttons, label_method: :last, value_method: :first, item_wrapper_class: 'inline', checked: true %>
In my features I have:
fill_form(:student, { name: 'Joe', sex: 'M' })
But capybara isnt beeing able to find it (actually formulaic is not finding it):
**Formulaic::InputNotFound:**
Unable to find input "Sex".
The only way it found it was hard referencing it:
fill_form(:student, {
name: 'Joe',
'enrollment[student_attributes][sex]' => 'M'
})
calebhearth commented
What HTML is being generated from the helper there?