Adds specs for show view has document present on all phases
This commit is contained in:
@@ -134,13 +134,22 @@ feature 'Legislation' do
|
|||||||
context "show" do
|
context "show" do
|
||||||
include_examples "not published permissions", :legislation_process_path
|
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)
|
process = create(:legislation_process)
|
||||||
document = create(:document, documentable: process)
|
document = create(:document, documentable: process)
|
||||||
|
phases = ["Debate", "Proposals", "Draft publication",
|
||||||
|
"Comments", "Final result publication"]
|
||||||
|
|
||||||
visit legislation_process_path(process)
|
visit legislation_process_path(process)
|
||||||
|
|
||||||
|
phases.each do |phase|
|
||||||
|
within(".legislation-process-list") do
|
||||||
|
find('li', :text => "#{phase}").click_link
|
||||||
|
end
|
||||||
|
|
||||||
expect(page).to have_content(document.title)
|
expect(page).to have_content(document.title)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
scenario 'show additional info button' do
|
scenario 'show additional info button' do
|
||||||
process = create(:legislation_process, additional_info: "Text for additional info of the process")
|
process = create(:legislation_process, additional_info: "Text for additional info of the process")
|
||||||
|
|||||||
Reference in New Issue
Block a user