Commit 42d4ebbc authored by Robert Speicher's avatar Robert Speicher Committed by GitLab Release Tools Bot

Merge branch 'sh-fix-real-size-warnings' into 'master'

Fix broken templated "Too many changes to show" text

Closes #56138

See merge request gitlab-org/gitlab-ce!24282

(cherry picked from commit 819de8e8)

488d7d1f Fix broken templated "Too many changes to show" text
parent 077f443b
......@@ -9,4 +9,4 @@
= link_to _("Plain diff"), merge_request_path(@merge_request, format: :diff), class: "btn btn-sm"
= link_to _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn btn-sm"
%p
= _("To preserve performance only <strong>%{display_size} of ${real_size}</strong> files are displayed.").html_safe % { display_size: diff_files.size, real_size: diff_files.real_size }
= _("To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed.").html_safe % { display_size: diff_files.size, real_size: diff_files.real_size }
---
title: Fix broken templated "Too many changes to show" text
merge_request: 24282
author:
type: fixed
......@@ -7194,7 +7194,7 @@ msgstr ""
msgid "To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here."
msgstr ""
msgid "To preserve performance only <strong>%{display_size} of ${real_size}</strong> files are displayed."
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr ""
msgid "To start serving your jobs you can add Runners to your group"
......
......@@ -87,6 +87,21 @@ describe "Compare", :js do
expect(find(".js-compare-from-dropdown .dropdown-content")).to have_selector("li", count: 3)
end
context 'when commit has overflow', :js do
it 'displays warning' do
visit project_compare_index_path(project, from: "feature", to: "master")
allow(Commit).to receive(:max_diff_options).and_return(max_files: 3)
allow_any_instance_of(DiffHelper).to receive(:render_overflow_warning?).and_return(true)
click_button('Compare')
page.within('.alert') do
expect(page).to have_text("Too many changes to show. To preserve performance only 3 of 3+ files are displayed.")
end
end
end
end
describe "tags" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment