Created
March 15, 2012 20:09
-
-
Save fabiokr/2046570 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/gems/capybara-webkit-0.10.0/lib/capybara/driver/webkit/node.rb:127:in `check_visibility' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/gems/capybara-webkit-0.10.0/lib/capybara/driver/webkit/node.rb:36:in `select_option' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/gems/capybara-1.1.2/lib/capybara/node/element.rb:83:in `block in select_option' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/gems/capybara-1.1.2/lib/capybara/node/base.rb:46:in `wait_until' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/gems/capybara-1.1.2/lib/capybara/node/element.rb:83:in `select_option' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/bundler/gems/splinter-81bbe9fa8ac9/lib/splinter/capybara/actions.rb:109:in `find_and_select_option' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/bundler/gems/splinter-81bbe9fa8ac9/lib/splinter/capybara/actions.rb:48:in `block in complete_form' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/bundler/gems/splinter-81bbe9fa8ac9/lib/splinter/capybara/form_completer.rb:41:in `each' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/bundler/gems/splinter-81bbe9fa8ac9/lib/splinter/capybara/form_completer.rb:41:in `each_input' | |
/home/fabio/.rvm/gems/ruby-1.9.3-p0-perf/bundler/gems/splinter-81bbe9fa8ac9/lib/splinter/capybara/actions.rb:48:in `complete_form' | |
/home/fabio/dev/site5/helix/spec/support/request_shared_specs/commentable.rb:30:in `block (3 levels) in <top (required)>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= simple_form_for(Comment.new, remote: true) do |f| %> | |
<%= f.input :commentable_id, as: :hidden, input_html: { value: commentable.id } %> | |
<%= f.input :commentable_type, as: :hidden, input_html: { value: commentable.class.name } %> | |
<%= f.input :category_id do %> | |
<%= f.select :category_id, comment_categories_options_for_select(f.object.category_id), { include_blank: true }, class: "select" %> | |
<% end %> | |
<%= f.input :title %> | |
<%= f.input :content, input_html: { rows: 5 } %> | |
<div class="form-actions"> | |
<%= f.button :submit, t("create") %> | |
<%= link_to t("cancel"), "#", class: 'btn cancel-comment-trigger' %> | |
</div> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "should allow to create a new comment" do | |
click_link "New Comment" | |
# THIS FAILS | |
# complete_form :comment do |f| | |
# f.select :category_id, "abuse" | |
# f.text_field :title, "My comment title" | |
# f.text_field :content, "My comment content" | |
# end | |
# THIS WORKS | |
select "Abuse", from: "Category" | |
fill_in "Title", with: "My comment title" | |
fill_in "Content", with: "My comment content" | |
click_button "Create" | |
within_table("table-list-comments") do | |
find(:xpath, "//tr[contains(., \"My comment title\")]").click_link("View") | |
should have_content("My comment content") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment