senny / corner_stones

capybara building blocks for acceptance tests.
18 stars 8 forks source link

handling for custom form fields #22

Open stmichael opened 11 years ago

stmichael commented 11 years ago

In our forms we have a bunch of special autocompletion fields which do not conform with the implementation for the standard autocompletion field. So corner_stones doesn't work with them.

It would be nice to have a mechanism to provide custom field handlers like:

CornerStones::Form::FieldSelector.add_field_handler(custom_autocompleter)

Or with a config like mechanism:

CornerStones::Form.config do |c|
  c.add_field_handler(custom_autocompleter)
end

corner_stones should check the custom field handlers before the general handlers provided by itself because the custom fields are always subsets of the general handlers.

senny commented 11 years ago

sounds like a reasonable feature. I'll have a look at it.