Shows participation phases only if there is a phase enabled
This commit is contained in:
@@ -47,17 +47,32 @@ feature 'Legislation' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'Key dates are displayed on current locale' do
|
||||
scenario 'Participation phases are displayed only if there is a phase enabled' do
|
||||
process = create(:legislation_process, :empty)
|
||||
process_debate = create(:legislation_process)
|
||||
|
||||
visit legislation_process_path(process)
|
||||
|
||||
expect(page).not_to have_content("Participation phases")
|
||||
|
||||
visit legislation_process_path(process_debate)
|
||||
|
||||
expect(page).to have_content("Participation phases")
|
||||
end
|
||||
|
||||
scenario 'Participation phases are displayed on current locale' do
|
||||
process = create(:legislation_process, proposals_phase_start_date: Date.new(2018, 01, 01),
|
||||
proposals_phase_end_date: Date.new(2018, 12, 01))
|
||||
|
||||
visit legislation_process_path(process)
|
||||
|
||||
expect(page).to have_content("Participation phases")
|
||||
expect(page).to have_content("Proposals")
|
||||
expect(page).to have_content("01 Jan 2018 - 01 Dec 2018")
|
||||
|
||||
visit legislation_process_path(process, locale: "es")
|
||||
|
||||
expect(page).to have_content("Fases de participación")
|
||||
expect(page).to have_content("Propuestas")
|
||||
expect(page).to have_content("01 ene 2018 - 01 dic 2018")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user