From 1a22db8b17ec912c56778929a827043ed553e010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 22 Feb 2024 22:54:50 +0100 Subject: [PATCH] Fix link to debates help This link used to open in a new window, and we accidentally changed that behavior while refactoring it in commit c2710de5f. Since we're adding a test for this case, and the Proposals::NewComponent class is similar, we're adding a test for that class too. In the case of proposals, we need to sign in a user because the proposals form contains fields to attach image, that currently rely on a user being signed in. --- app/components/debates/new_component.html.erb | 2 +- spec/components/debates/new_component_spec.rb | 15 +++++++++++++++ spec/components/proposals/new_component_spec.rb | 16 ++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 spec/components/debates/new_component_spec.rb create mode 100644 spec/components/proposals/new_component_spec.rb diff --git a/app/components/debates/new_component.html.erb b/app/components/debates/new_component.html.erb index 17fb6c9b9..1335ca037 100644 --- a/app/components/debates/new_component.html.erb +++ b/app/components/debates/new_component.html.erb @@ -2,7 +2,7 @@ <%= back_link_to debates_path, t("debates.index.section_header.title") %> <%= header do %> - <%= link_to t("debates.new.more_info"), help_path(anchor: "debates") %> + <%= new_window_link_to t("debates.new.more_info"), help_path(anchor: "debates") %> <% end %>