Project

General

Profile

Defect #44703 ยป fix-tests-for-nokogiri-1_19_5.patch

Go MAEDA, 2026-11-02 11:24

View differences:

test/functional/issues_controller_test.rb
assert_select 'div.attachments a.icon-attachment[href=?]', '/attachments/4'
assert_select 'div.attachments span.attachment-journal a', 1
assert_select 'div.attachments span.attachment-journal a[href=?][title=?]', '#note-1', '#note-1' do
assert_select "svg.icon-svg use:match('href', ?)", /assets\/icons-\w+.svg#icon--chevrons-down/
assert_select "svg.icon-svg use:match('href', ?)", %r{assets/icons-[0-9a-f]+.svg#icon--chevrons-down}
end
end
......
assert_response :success
assert_select 'div.attachments' do
assert_select 'a.icon-attachment[href=?]', '/attachments/1' do
assert_select "svg.icon-svg use:match('href', ?)", /assets\/icons-\w+.svg#icon--text-plain/
assert_select "svg.icon-svg use:match('href', ?)", %r{assets/icons-[0-9a-f]+.svg#icon--text-plain}
end
assert_select 'a.icon-attachment[href=?]', '/attachments/6' do
assert_select "svg.icon-svg use:match('href', ?)", /assets\/icons-\w+.svg#icon--application-zip/
assert_select "svg.icon-svg use:match('href', ?)", %r{assets/icons-[0-9a-f]+.svg#icon--application-zip}
end
end
end
......
assert_response :success
reason = l(:notice_issue_not_closable_by_blocking_issue)
assert_select 'span.icon-warning[title=?]', reason do
assert_select "svg.icon-svg use:match('href', ?)", /assets\/icons-\w+.svg#icon--warning/
assert_select "svg.icon-svg use:match('href', ?)", %r{assets/icons-[0-9a-f]+.svg#icon--warning}
assert_select 'span.icon-label', test: reason
end
end
test/integration/layout_test.rb
get '/projects/ecookbook/issues/new'
assert_select "head script:match('src',?)", %r{/assets/jstoolbar/}, 0
assert_select "head link[rel=stylesheet]:match('href',?)", %r{/assets/jstoolbar-\w+.css}
assert_select "head link[rel=stylesheet]:match('href',?)", %r{/assets/jstoolbar-[0-9a-f]+.css}
assert_include "var wikiImageMimeTypes = #{Redmine::MimeType.by_type('image').to_json};", response.body
assert_select 'div.jstBlock:has(textarea#issue_description)' do
UserPreference::DEFAULT_TOOLBAR_LANGUAGE_OPTIONS.each do |lang|
test/integration/lib/redmine/themes_test.rb
get '/'
assert_response :success
assert_select "link[rel=stylesheet]:match('href', ?)", %r{/assets/themes/#{@theme.dir}/application-\w+\.css}
assert_select "link[rel=stylesheet]:match('href', ?)", %r{/assets/themes/#{@theme.dir}/application-[0-9a-f]+.css}
end
def test_without_theme_js
......
get '/'
assert_response :success
assert_select "link[rel='shortcut icon']:match('href',?)", %r{/assets/favicon-\w+\.ico}
assert_select "link[rel='shortcut icon']:match('href',?)", %r{/assets/favicon-[0-9a-f]+.ico}
end
def test_use_theme_favicon_if_theme_provides_one
......
get '/'
assert_response :success
assert_select "link[rel=stylesheet]:match('href', ?)", %r{/foo/assets/themes/#{@theme.dir}/application-\w+\.css}
assert_select "link[rel=stylesheet]:match('href', ?)", %r{/foo/assets/themes/#{@theme.dir}/application-[0-9a-f]+.css}
assert_select "script[src^=?]", "/foo/assets/themes/#{@theme.dir}/theme.js"
assert_select 'link[rel="shortcut icon"][href^=?]', "/foo/assets/themes/#{@theme.dir}/a.ico"
ensure
    (1-1/1)