capybara-ui
capybara-ui copied to clipboard
Roles and page objects for Capybara integration testing - Formerly called Dill
Currently the error message can be a bit misleading. "Unable to see your_widget and my-class". If the widget is defined in part by the class, the error message would be...
This is a problem if one is using a widget to get the actual value attribute. ``` bash widget(:my_input).value => "" widget(:my_input).root.value => "My value" ```
A recent change breaks usage on Rails using the `rspec-rails` gem, but tests could not catch it.
This custom RSpec step would minimize awkwardness from being forced to find ways to make :see work. e.g. ``` expect(roles.user).to be :in_edit_mode vs expect(roles.user).to see :edit_mode_enabled ``` ``` def is_in_edit_mode?...
http://www.rubydoc.info/github/jnicklas/capybara/Capybara%2FNode%2FActions%3Aattach_file
http://www.rubydoc.info/github/jnicklas/capybara/Capybara/Node/Element#drag_to-instance_method e.g. `widget(:item).drag_to(widget(:item_list_top))`
They will be automatically scoped to the current widget