Added test for comments

This commit is contained in:
iagirre
2017-09-13 16:04:45 +02:00
parent 1356ea217b
commit 2621d2694b
4 changed files with 16 additions and 0 deletions

View File

@@ -33,6 +33,10 @@ feature 'Commenting Budget::Investments' do
expect(page).to have_content second_child.body
expect(page).to have_link "Go back to #{investment.title}", href: budget_investment_path(investment.budget, investment)
expect(page).to have_selector("ul#comment_#{parent_comment.id}>li", count: 2)
expect(page).to have_selector("ul#comment_#{first_child.id}>li", count: 1)
expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1)
end
scenario 'Collapsable comments', :js do

View File

@@ -38,6 +38,10 @@ feature 'Commenting legislation questions' do
expect(page).to have_content second_child.body
expect(page).to have_link "Go back to #{legislation_annotation.title}", href: href
expect(page).to have_selector("ul#comment_#{parent_comment.id}>li", count: 2)
expect(page).to have_selector("ul#comment_#{first_child.id}>li", count: 1)
expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1)
end
scenario 'Collapsable comments', :js do

View File

@@ -35,6 +35,10 @@ feature 'Commenting legislation questions' do
expect(page).to have_content second_child.body
expect(page).to have_link "Go back to #{legislation_question.title}", href: href
expect(page).to have_selector("ul#comment_#{parent_comment.id}>li", count: 2)
expect(page).to have_selector("ul#comment_#{first_child.id}>li", count: 1)
expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1)
end
scenario 'Collapsable comments', :js do

View File

@@ -33,6 +33,10 @@ feature 'Commenting proposals' do
expect(page).to have_content second_child.body
expect(page).to have_link "Go back to #{proposal.title}", href: proposal_path(proposal)
expect(page).to have_selector("ul#comment_#{parent_comment.id}>li", count: 2)
expect(page).to have_selector("ul#comment_#{first_child.id}>li", count: 1)
expect(page).to have_selector("ul#comment_#{second_child.id}>li", count: 1)
end
scenario 'Collapsable comments', :js do