Hovering over the votes showed a "participation not allowed" message which was annoying when scrolling with the browser or simply moving the mouse around the page. Furthermore, it hid the information about the number of votes, links to show/collapse replies, ... We're planning to change the behavior of all the "participation not allowed" messages in order to show them on click instead of showing them on hover (just like it's done on touchscreens). In the case of comments, supports, however, there's very limited space in the part showing the number of supports for comments, so adding this message without breaking the layout is challenging. So, for now, we're simply redirecting unauthenticated users to the login page. If find an easy way to implement a better user interface in the future to display the "participation not allowed" message, we might change this behaviour.
17 lines
587 B
Ruby
17 lines
587 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_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
|