Files
grecia/spec/support/common_actions/votes.rb
Javi Martín 8c1b4d9ea7 Replace links to agree/disagree with buttons
As mentioned in commits 5311daadf and bb958daf0, using links combined
with JavaScript to generate POST requests to the server has a few
issues.
2022-02-21 18:47:37 +01:00

23 lines
777 B
Ruby

module Votes
def expect_message_you_need_to_sign_in
expect(page).to have_content "You must sign in or sign up to continue"
expect(page).to have_selector(".in-favor", obscured: true)
end
def expect_message_you_need_to_sign_in_to_vote_comments
within(".participation-not-allowed") do
expect(page).to have_content "You must sign in or sign up to vote"
end
end
def expect_message_to_many_anonymous_votes
expect(page).to have_content "Too many anonymous votes to admit vote"
expect(page).to have_button "I agree", obscured: true
end
def expect_message_only_verified_can_vote_proposals
expect(page).to have_content "Only verified users can vote on proposals"
expect(page).to have_selector(".in-favor", obscured: true)
end
end