From 62401f42e39f97e24399b508514ff59ca570bdac Mon Sep 17 00:00:00 2001 From: Takenori Takaki Date: Wed, 11 Dec 2024 10:27:55 +0900 Subject: [PATCH 5/5] Replace warning icon in issue_transitiont with SVG --- app/views/issues/_attributes.html.erb | 2 +- test/functional/issues_controller_test.rb | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 65637e51f7..9707674601 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -9,7 +9,7 @@ :title => @issue.status.description %> <%= content_tag 'a', sprite_icon('help', l(:label_open_issue_statuses_description)), :class => 'icon-only icon-help', :title => l(:label_open_issue_statuses_description), :onclick => "showModal('issue_statuses_description', '500px'); return false;", :href => '#' if @allowed_statuses.any? {|s| s.description.present? } %> <% if @issue.transition_warning %> - <%= @issue.transition_warning %> + <%= sprite_icon('warning', l(:notice_issue_not_closable_by_open_tasks)) %> <% end %>

<%= render partial: 'issues/issue_status_description', locals: { issue_statuses: @allowed_statuses } %> diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index fbe5121223..643345eac4 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -5993,7 +5993,10 @@ class IssuesControllerTest < Redmine::ControllerTest assert_response :success reason = l(:notice_issue_not_closable_by_blocking_issue) - assert_select 'span.icon-warning[title=?]', reason, :text => reason + assert_select 'span.icon-warning[title=?]', reason do + assert_select "svg.icon-svg use:match('href', ?)", /assets\/icons-\w+.svg#icon--warning/ + assert_select 'span.icon-label', test: reason + end end def test_get_edit_should_display_visible_spent_time_custom_field -- 2.30.0