From b74b63cb72f97da259b022de1e3949345dca4525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 4 May 2022 12:13:20 +0200 Subject: [PATCH 1/2] Remove unused partial It isn't used since commit 5d37997a6, when it was replaced with the `debate.html.erb` template. --- .../legislation/processes/_debate.html.erb | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 app/views/legislation/processes/_debate.html.erb diff --git a/app/views/legislation/processes/_debate.html.erb b/app/views/legislation/processes/_debate.html.erb deleted file mode 100644 index 57f0b5f71..000000000 --- a/app/views/legislation/processes/_debate.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
-
- <% if process.questions.empty? %> -

<%= t("legislation.processes.debate.empty_questions") %>

- <% else %> - <%= render process.questions %> - <% end %> -
-
- -<% if process.questions.any? %> -
-
-

<%= t("legislation.processes.debate.participate") %>

-
-
-<% end %> From 00f0c4410de85d225bc473694378af0d65545809 Mon Sep 17 00:00:00 2001 From: decabeza Date: Sat, 30 Apr 2022 18:18:01 +0200 Subject: [PATCH 2/2] Remove unnecessary alert on legislation processes --- app/views/legislation/processes/debate.html.erb | 8 -------- config/locales/en/legislation.yml | 1 - config/locales/es/legislation.yml | 1 - spec/system/legislation/processes_spec.rb | 4 ---- spec/system/legislation/questions_spec.rb | 2 -- 5 files changed, 16 deletions(-) diff --git a/app/views/legislation/processes/debate.html.erb b/app/views/legislation/processes/debate.html.erb index 0849fa1c6..c6a365632 100644 --- a/app/views/legislation/processes/debate.html.erb +++ b/app/views/legislation/processes/debate.html.erb @@ -20,14 +20,6 @@ <% end %> - - <% if @process.questions.any? %> -
-
-

<%= t("legislation.processes.debate.participate") %>

-
-
- <% end %> diff --git a/config/locales/en/legislation.yml b/config/locales/en/legislation.yml index 263dd4662..2e777da2a 100644 --- a/config/locales/en/legislation.yml +++ b/config/locales/en/legislation.yml @@ -54,7 +54,6 @@ en: winners: Selected debate: empty_questions: There aren't any questions - participate: Participate in the debate index: filter: Filter filters: diff --git a/config/locales/es/legislation.yml b/config/locales/es/legislation.yml index 480fce46b..33693570e 100644 --- a/config/locales/es/legislation.yml +++ b/config/locales/es/legislation.yml @@ -54,7 +54,6 @@ es: winners: Seleccionadas debate: empty_questions: No hay preguntas - participate: Realiza tus aportaciones al debate previo participando en los siguientes temas. index: filter: Filtro filters: diff --git a/spec/system/legislation/processes_spec.rb b/spec/system/legislation/processes_spec.rb index 5eccacfa5..7304fc543 100644 --- a/spec/system/legislation/processes_spec.rb +++ b/spec/system/legislation/processes_spec.rb @@ -255,7 +255,6 @@ describe "Legislation" do end expect(page).to have_content("This is the process homepage") - expect(page).not_to have_content("Participate in the debate") end scenario "disabled", :with_frozen_time do @@ -282,7 +281,6 @@ describe "Legislation" do visit legislation_process_path(process) expect(page).to have_content("This phase is not open yet") - expect(page).not_to have_content("Participate in the debate") end scenario "open without questions" do @@ -290,7 +288,6 @@ describe "Legislation" do visit legislation_process_path(process) - expect(page).not_to have_content("Participate in the debate") expect(page).not_to have_content("This phase is not open yet") end @@ -303,7 +300,6 @@ describe "Legislation" do expect(page).to have_content("Question 1") expect(page).to have_content("Question 2") - expect(page).to have_content("Participate in the debate") expect(page).not_to have_content("This phase is not open yet") end diff --git a/spec/system/legislation/questions_spec.rb b/spec/system/legislation/questions_spec.rb index 349ed0512..bbf55184c 100644 --- a/spec/system/legislation/questions_spec.rb +++ b/spec/system/legislation/questions_spec.rb @@ -17,8 +17,6 @@ describe "Legislation" do scenario "shows question list" do visit legislation_process_path(process) - expect(page).to have_content("Participate in the debate") - expect(page).to have_content("Question 1") expect(page).to have_content("Question 2") expect(page).to have_content("Question 3")