forked from consuldemocracy/consuldemocracy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'voting-proposals' of github.com:consul/consul into voti…
…ng-proposals
- Loading branch information
Showing
10 changed files
with
78 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/views/proposal_ballots/_featured_successfull_proposal.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<div id="<%= dom_id(proposal) %>" class="proposal-sucessfull"> | ||
<div id="<%= dom_id(proposal) %>_next_voting" class="proposal-sucessfull"> | ||
<h3><%= link_to proposal.title, proposal_ballots_path %></h3> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# coding: utf-8 | ||
require 'rails_helper' | ||
|
||
feature 'Proposal ballots' do | ||
|
||
scenario 'Banner shows in proposal index' do | ||
create_featured_proposals | ||
|
||
visit proposals_path | ||
expect(page).to_not have_css("#next-voting") | ||
expect(page).to have_css("#featured-proposals") | ||
|
||
create_successfull_proposals | ||
|
||
visit proposals_path | ||
|
||
expect(page).to have_css("#next-voting") | ||
expect(page).to_not have_css("#featured-proposals") | ||
end | ||
|
||
scenario 'Successfull proposals do not show support buttons in index' do | ||
successfull_proposals = create_successfull_proposals | ||
|
||
visit proposals_path | ||
|
||
successfull_proposals.each do |proposal| | ||
within("#proposal_#{proposal.id}_votes") do | ||
expect(page).to_not have_css(".supports") | ||
expect(page).to have_content "This proposal has reached the required supports" | ||
end | ||
end | ||
end | ||
|
||
scenario 'Successfull proposals do not show support buttons in show' do | ||
successfull_proposals = create_successfull_proposals | ||
|
||
successfull_proposals.each do |proposal| | ||
visit proposal_path(proposal) | ||
within("#proposal_#{proposal.id}_votes") do | ||
expect(page).to_not have_css(".supports") | ||
expect(page).to have_content "This proposal has reached the required supports" | ||
end | ||
end | ||
end | ||
|
||
scenario 'Successfull proposals are listed in the proposal ballots index' do | ||
successfull_proposals = create_successfull_proposals | ||
|
||
visit proposal_ballots_path | ||
|
||
successfull_proposals.each do |proposal| | ||
expect(page).to have_content(proposal.title) | ||
expect(page).to have_content(proposal.question) | ||
end | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters