diff --git a/spec/features/comments/budget_investments_spec.rb b/spec/features/comments/budget_investments_spec.rb index c22ab56cb..bf30bace6 100644 --- a/spec/features/comments/budget_investments_spec.rb +++ b/spec/features/comments/budget_investments_spec.rb @@ -471,6 +471,11 @@ feature 'Commenting Budget::Investments' do within("#comment_#{@comment.id}_votes") do find('.in_favor a').click + + within('.in_favor') do + expect(page).to have_content "1" + end + find('.against a').click within('.in_favor') do diff --git a/spec/features/comments/debates_spec.rb b/spec/features/comments/debates_spec.rb index 66b35e671..a6015620b 100644 --- a/spec/features/comments/debates_spec.rb +++ b/spec/features/comments/debates_spec.rb @@ -476,6 +476,11 @@ feature 'Commenting debates' do within("#comment_#{@comment.id}_votes") do find('.in_favor a').click + + within('.in_favor') do + expect(page).to have_content "1" + end + find('.against a').click within('.in_favor') do diff --git a/spec/features/comments/legislation_annotations_spec.rb b/spec/features/comments/legislation_annotations_spec.rb index 1b54bf33a..cb86b203f 100644 --- a/spec/features/comments/legislation_annotations_spec.rb +++ b/spec/features/comments/legislation_annotations_spec.rb @@ -553,6 +553,11 @@ feature 'Commenting legislation questions' do within("#comment_#{@comment.id}_votes") do find('.in_favor a').click + + within('.in_favor') do + expect(page).to have_content "1" + end + find('.against a').click within('.in_favor') do diff --git a/spec/features/comments/polls_spec.rb b/spec/features/comments/polls_spec.rb index b706a198a..5e4bb51ef 100644 --- a/spec/features/comments/polls_spec.rb +++ b/spec/features/comments/polls_spec.rb @@ -485,6 +485,11 @@ feature 'Commenting polls' do within("#comment_#{@comment.id}_votes") do find('.in_favor a').click + + within('.in_favor') do + expect(page).to have_content "1" + end + find('.against a').click within('.in_favor') do diff --git a/spec/features/comments/topics_spec.rb b/spec/features/comments/topics_spec.rb index f8c9f3fc5..d66afc756 100644 --- a/spec/features/comments/topics_spec.rb +++ b/spec/features/comments/topics_spec.rb @@ -515,6 +515,11 @@ feature 'Commenting topics from proposals' do within("#comment_#{@comment.id}_votes") do find('.in_favor a').click + + within('.in_favor') do + expect(page).to have_content "1" + end + find('.against a').click within('.in_favor') do @@ -1065,6 +1070,11 @@ feature 'Commenting topics from budget investments' do within("#comment_#{@comment.id}_votes") do find('.in_favor a').click + + within('.in_favor') do + expect(page).to have_content "1" + end + find('.against a').click within('.in_favor') do diff --git a/spec/features/votes_spec.rb b/spec/features/votes_spec.rb index c837deebf..1ebdcfc91 100644 --- a/spec/features/votes_spec.rb +++ b/spec/features/votes_spec.rb @@ -83,6 +83,12 @@ feature 'Votes' do visit debate_path(create(:debate)) find('.in-favor a').click + + within('.in-favor') do + expect(page).to have_content "100%" + expect(page).to have_css("a.voted") + end + find('.against a').click within('.in-favor') do