Unify voting comments update specs
This commit is contained in:
@@ -81,30 +81,6 @@ describe "Commenting Budget::Investments" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit budget_investment_path(budget, investment)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit budget_investment_path(budget, investment)
|
||||
|
||||
|
||||
@@ -135,30 +135,6 @@ describe "Commenting debates" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit debate_path(debate)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit debate_path(debate)
|
||||
|
||||
|
||||
@@ -30,30 +30,6 @@ describe "Commenting legislation questions" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit polymorphic_path(annotation)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit polymorphic_path(annotation)
|
||||
|
||||
|
||||
@@ -32,30 +32,6 @@ describe "Commenting legislation questions" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit legislation_process_question_path(question.process, question)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit legislation_process_question_path(question.process, question)
|
||||
|
||||
|
||||
@@ -14,30 +14,6 @@ describe "Commenting polls" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit poll_path(poll)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit poll_path(poll)
|
||||
|
||||
|
||||
@@ -15,30 +15,6 @@ describe "Commenting proposals" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit proposal_path(proposal)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit proposal_path(proposal)
|
||||
|
||||
|
||||
@@ -16,30 +16,6 @@ describe "Commenting topics from proposals" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit community_topic_path(proposal.community, topic)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit community_topic_path(proposal.community, topic)
|
||||
|
||||
@@ -81,30 +57,6 @@ describe "Commenting topics from budget investments" do
|
||||
login_as(verified)
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit community_topic_path(investment.community, topic)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Allow undoing votes" do
|
||||
visit community_topic_path(investment.community, topic)
|
||||
|
||||
|
||||
@@ -541,6 +541,30 @@ describe "Comments" do
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Update" do
|
||||
visit polymorphic_path(resource)
|
||||
|
||||
within("#comment_#{comment.id}_votes") do
|
||||
click_button "I agree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
click_button "I disagree"
|
||||
|
||||
within(".in-favor") do
|
||||
expect(page).to have_content "0"
|
||||
end
|
||||
|
||||
within(".against") do
|
||||
expect(page).to have_content "1"
|
||||
end
|
||||
|
||||
expect(page).to have_content "1 vote"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Errors on create" do
|
||||
|
||||
Reference in New Issue
Block a user