Added test for comments
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user