Fix failing tests (#43643).

git-svn-id: https://svn.redmine.org/redmine/trunk@24362 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Marius Balteanu
2026-01-23 19:28:40 +00:00
parent 083f8af2b8
commit 9e61fc978b
2 changed files with 10 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ require_relative '../test_helper'
class ApplicationHelperTest < Redmine::HelperTest
include ERB::Util
include AvatarsHelper
include IconsHelper
def setup
super
@@ -2431,8 +2432,10 @@ class ApplicationHelperTest < Redmine::HelperTest
end
def pre_wrapper(text)
'<div class="pre-wrapper" data-controller="clipboard"><a class="copy-pre-content-link icon-only" title=\"Copy\" data-action="clipboard#copyPre">' +
'<svg class="s18 icon-svg" aria-hidden="true"><use href="/assets/icons-34cfafab.svg#icon--copy-pre-content"></use></svg></a>' +
icon = sprite_icon('copy-pre-content', size: 18)
button_copy = l(:button_copy)
'<div class="pre-wrapper" data-controller="clipboard"><a class="copy-pre-content-link icon-only" title="' + button_copy + '" data-action="clipboard#copyPre">' +
icon + '</a>' +
text +
'</div>'
end

View File

@@ -23,6 +23,7 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
include ActionView::Helpers::TextHelper
include ActionView::Helpers::SanitizeHelper
include ERB::Util
include IconsHelper
extend ActionView::Helpers::SanitizeHelper::ClassMethods
def setup
@@ -627,8 +628,10 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest
end
def pre_wrapper(text)
'<div class="pre-wrapper" data-controller="clipboard"><a class="copy-pre-content-link icon-only" data-action="clipboard#copyPre">' +
'<svg class="s18 icon-svg" aria-hidden="true"><use href="/assets/icons-34cfafab.svg#icon--copy-pre-content"></use></svg></a>' +
icon = sprite_icon('copy-pre-content', size: 18)
button_copy = l(:button_copy)
'<div class="pre-wrapper" data-controller="clipboard"><a class="copy-pre-content-link icon-only" title="' + button_copy + '" data-action="clipboard#copyPre">' +
icon + '</a>' +
text +
'</div>'
end