From 8dbb7c0ac4f7ddba2602d307138ae204baa3be76 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Tue, 8 Apr 2025 15:41:02 +0100 Subject: [PATCH] Refactor testing env create log and BU file links (#3049) * Add testing tools section with links in testing environments * Refactor testing tools links to use button links for improved UI * Update button icon sizes for bulk upload links in log actions component * Fix typo in testing tools visibility message in log actions component * Change text * Lint * Rename app-testing-tools class to app-testing-tools__inset for consistency in styling * Rename app-testing-tools-link class to app-testing-tools__link for consistency --- .../create_log_actions_component.html.erb | 36 ++++++++++++++++--- app/frontend/styles/_testing-tools.scss | 20 +++++++++++ app/frontend/styles/application.scss | 1 + 3 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 app/frontend/styles/_testing-tools.scss diff --git a/app/components/create_log_actions_component.html.erb b/app/components/create_log_actions_component.html.erb index 2c3b75aea..bd2ba1e98 100644 --- a/app/components/create_log_actions_component.html.erb +++ b/app/components/create_log_actions_component.html.erb @@ -9,10 +9,38 @@ <% end %> <% if FeatureToggle.create_test_logs_enabled? %> - <%= govuk_link_to "New test log", create_test_log_href %> - <%= govuk_link_to "New test log (setup only)", create_setup_test_log_href %> - <%= govuk_link_to "24 BU test file", create_test_bulk_upload_href(2024) %> - <%= govuk_link_to "25 BU test file", create_test_bulk_upload_href(2025) %> +
+ Testing tools + These options can only be seen and used in testing environments. +
+ <%= govuk_button_link_to create_test_log_href, class: "govuk-button" do %> + New test log + + <% end %> + <%= govuk_button_link_to create_setup_test_log_href, class: "govuk-button" do %> + New test log (setup only) + + <% end %> + <%= govuk_button_link_to create_test_bulk_upload_href(2024), class: "govuk-button govuk-button--secondary" do %> + 24/25 BU test file + + + + + <% end %> + <%= govuk_button_link_to create_test_bulk_upload_href(2025), class: "govuk-button govuk-button--secondary" do %> + 25/26 BU test file + + + + + <% end %> +
+
<% end %> <% end %> diff --git a/app/frontend/styles/_testing-tools.scss b/app/frontend/styles/_testing-tools.scss new file mode 100644 index 000000000..325d2fbf8 --- /dev/null +++ b/app/frontend/styles/_testing-tools.scss @@ -0,0 +1,20 @@ +.app-testing-tools__inset { + border-left-color: #f47738; + margin-bottom: 0; + margin-top: 0; + padding-top: 5px; + padding-bottom: 5px; +} + +.app-testing-tools__link { + @include govuk-link-common; + @include govuk-link-style-no-visited-state; +} + +.app-testing-tools__tag { + @include govuk-font(14); + background-color: #fcd6c3; + margin-top: 0; + margin-bottom: 10px; + margin-right: 15px; +} diff --git a/app/frontend/styles/application.scss b/app/frontend/styles/application.scss index 370592640..33574bf9b 100644 --- a/app/frontend/styles/application.scss +++ b/app/frontend/styles/application.scss @@ -49,6 +49,7 @@ $govuk-breakpoints: ( @import "sub-navigation"; @import "unread-notification"; @import "red-link"; +@import "testing-tools"; @import "custom-rails-admin"; @import "node_modules/@ministryofjustice/frontend/moj/components/date-picker/date-picker";