Skip to content

Commit

Permalink
Adds specs for show view has document present on all phases
Browse files Browse the repository at this point in the history
  • Loading branch information
decabeza committed Dec 28, 2018
1 parent a3f15c3 commit a242c8f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions spec/features/legislation/processes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,21 @@
context "show" do
include_examples "not published permissions", :legislation_process_path

scenario '#show view has document present' do
scenario 'show view has document present on all phases' do
process = create(:legislation_process)
document = create(:document, documentable: process)
phases = ["Debate", "Proposals", "Draft publication",
"Comments", "Final result publication"]

visit legislation_process_path(process)

expect(page).to have_content(document.title)
phases.each do |phase|
within(".legislation-process-list") do
find('li', :text => "#{phase}").click_link
end

expect(page).to have_content(document.title)
end
end

scenario 'show additional info button' do
Expand Down

0 comments on commit a242c8f

Please sign in to comment.