Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-01-10 05:36:20 +0300
committerGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-01-16 21:13:04 +0300
commit0c12584ec6ee77ab8e593ea9cdef2e3d406b9753 (patch)
tree33668758bcfd0e92465c2e30053d3a4c4bbbfa28 /spec
parent25af96e46c2ae67a1dac37e399246792050b9223 (diff)
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 819de8e8084e1b0cc102664abb8bbc836ff99ede) 488d7d1f Fix broken templated "Too many changes to show" text
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/compare_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/features/projects/compare_spec.rb b/spec/features/projects/compare_spec.rb
index 69600884909..5f7cf68987e 100644
--- a/spec/features/projects/compare_spec.rb
+++ b/spec/features/projects/compare_spec.rb
@@ -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