Replace created at date to start and end date on admin legislation processes
This commit is contained in:
@@ -50,14 +50,22 @@ feature "Admin legislation processes" do
|
||||
end
|
||||
|
||||
scenario "Processes are sorted by descending start date" do
|
||||
create(:legislation_process, title: "Process 1", start_date: Date.yesterday)
|
||||
create(:legislation_process, title: "Process 2", start_date: Date.today)
|
||||
create(:legislation_process, title: "Process 3", start_date: Date.tomorrow)
|
||||
process_1 = create(:legislation_process, title: "Process 1", start_date: Date.yesterday)
|
||||
process_2 = create(:legislation_process, title: "Process 2", start_date: Date.today)
|
||||
process_3 = create(:legislation_process, title: "Process 3", start_date: Date.tomorrow)
|
||||
|
||||
visit admin_legislation_processes_path(filter: "all")
|
||||
|
||||
expect("Process 3").to appear_before("Process 2")
|
||||
expect("Process 2").to appear_before("Process 1")
|
||||
expect(page).to have_content (process_1.start_date)
|
||||
expect(page).to have_content (process_2.start_date)
|
||||
expect(page).to have_content (process_3.start_date)
|
||||
|
||||
expect(page).to have_content (process_1.end_date)
|
||||
expect(page).to have_content (process_2.end_date)
|
||||
expect(page).to have_content (process_3.end_date)
|
||||
|
||||
expect(process_3.title).to appear_before(process_2.title)
|
||||
expect(process_2.title).to appear_before(process_1.title)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -179,6 +187,14 @@ feature "Admin legislation processes" do
|
||||
expect(page).not_to have_content "Summary of the process"
|
||||
expect(page).to have_css("img[alt='#{Legislation::Process.last.title}']")
|
||||
end
|
||||
|
||||
scenario "Default colors are present" do
|
||||
visit new_admin_legislation_process_path
|
||||
|
||||
expect(find("#legislation_process_background_color").value).to eq "#e7f2fc"
|
||||
expect(find("#legislation_process_font_color").value).to eq "#222222"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context "Update" do
|
||||
|
||||
Reference in New Issue
Block a user