diff --git a/app/views/legislation/processes/_proposals_content.html.erb b/app/views/legislation/processes/_proposals_content.html.erb index 7ef52b337..b54ef902d 100644 --- a/app/views/legislation/processes/_proposals_content.html.erb +++ b/app/views/legislation/processes/_proposals_content.html.erb @@ -16,7 +16,7 @@
- <% if process.proposals_phase.open? %> + <% if process.proposals_phase.open? || process.draft_phase.open? %>

<%= link_to new_legislation_proposal_link_text(process), new_legislation_process_proposal_path(process), class: "button expanded", diff --git a/spec/features/legislation/processes_spec.rb b/spec/features/legislation/processes_spec.rb index f436263b6..882dbdfe9 100644 --- a/spec/features/legislation/processes_spec.rb +++ b/spec/features/legislation/processes_spec.rb @@ -198,6 +198,18 @@ describe "Legislation" do visit legislation_process_path(process) expect(page).to have_content("Français") end + + scenario "Shows Create a Proposal button when process is in draft phase" do + process = create(:legislation_process, + :in_draft_phase, + proposals_phase_start_date: Date.tomorrow) + + login_as(administrator) + visit legislation_process_proposals_path(process) + click_link "Create a proposal" + + expect(page).to have_current_path new_legislation_process_proposal_path(process) + end end context "homepage" do