Merge pull request #3137 from consul/key-dates-processes

[Backport] Processes key dates
This commit is contained in:
Alberto
2019-01-08 10:51:40 +01:00
committed by GitHub
26 changed files with 189 additions and 120 deletions

View File

@@ -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