0
Capybara는 내 웹 페이지에서 버튼을 보지 못합니다. 여기 내 테스트 코드Ruby on Rails 4 Rspec, Capybara는 버튼을 보지 못합니다.
before(:each) do
@inspiring = PostMotivation.create(:title => "This is title",:body => "body main content",:short => "short content of this post",:date => "20.06.2014")
end
it "should redirect when you want to add new comment" do
visit "/inspiring"
click_button("add_comment")
end
을 그리고 여기 내보기 볼 수 있습니다
<%= button_to new_main_dupa_path(0,0,@post_to_render3.id), class: "button",id: "add_comment" do %>
Add new comment!
<% end %>
오류는 다음과 같습니다
2) Testing inspiring subpage with integration tests should redirect when you want to add new comment
Failure/Error: click_button("add_comment")
Capybara::ElementNotFound:
Unable to find button "add_comment"
# ./spec/features/inspiring.rb:39:in `block (2 levels) in <top (required)>'
어떻게 카피 바라가이 버튼을 볼 수 있도록를? 방금 전에이 문제에 대한 해결책을 찾을 수 없었습니다.