Sort Legislation Processes by descending start date

This commit is contained in:
Julian Herrero
2019-01-17 18:05:29 +01:00
parent 858faa481c
commit 33d6f6c18d
5 changed files with 29 additions and 6 deletions

View File

@@ -47,6 +47,17 @@ feature 'Legislation' do
end
end
scenario "Processes are sorted by descending start date", :js do
create(:legislation_process, title: "Process 1", start_date: 3.days.ago)
create(:legislation_process, title: "Process 2", start_date: 2.days.ago)
create(:legislation_process, title: "Process 3", start_date: Date.yesterday)
visit legislation_processes_path
expect("Process 3").to appear_before("Process 2")
expect("Process 2").to appear_before("Process 1")
end
scenario 'Participation phases are displayed only if there is a phase enabled' do
process = create(:legislation_process, :empty)
process_debate = create(:legislation_process)