diff options
author | Sean McGivern <sean@gitlab.com> | 2017-05-12 17:44:03 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-06-02 19:37:09 +0100 |
commit | 1d3c33b57eeb39df76e78fd37c86532c02aa22ac (patch) | |
tree | 8c2a51cbf1fb6153192491c9d96e70d931c48041 /spec/features/expand_collapse_diffs_spec.rb | |
parent | f07aee72bef4604312e11a43fce3a47865bce100 (diff) | |
download | gitlab-ce-1d3c33b57eeb39df76e78fd37c86532c02aa22ac.tar.gz |
Increase diff limits to 100 KB for collapse and 200 KB overall31983-increase-merge-request-diff-file-size-limit-for-default-toggle-opening
This is controlled with the feature flag gitlab_git_diff_size_limit_increase.
Both of these limits were basically picked arbitrarily in the first place;
disabling the feature flag reverts to the old limits.
Diffstat (limited to 'spec/features/expand_collapse_diffs_spec.rb')
-rw-r--r-- | spec/features/expand_collapse_diffs_spec.rb | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/spec/features/expand_collapse_diffs_spec.rb b/spec/features/expand_collapse_diffs_spec.rb index 0cb75538311..c4d5077e5e1 100644 --- a/spec/features/expand_collapse_diffs_spec.rb +++ b/spec/features/expand_collapse_diffs_spec.rb @@ -5,6 +5,11 @@ feature 'Expand and collapse diffs', js: true, feature: true do let(:project) { create(:project, :repository) } before do + # Set the limits to those when these specs were written, to avoid having to + # update the test repo every time we change them. + allow(Gitlab::Git::Diff).to receive(:size_limit).and_return(100.kilobytes) + allow(Gitlab::Git::Diff).to receive(:collapse_limit).and_return(10.kilobytes) + login_as :admin # Ensure that undiffable.md is in .gitattributes @@ -62,18 +67,6 @@ feature 'Expand and collapse diffs', js: true, feature: true do expect(small_diff).not_to have_selector('.nothing-here-block') end - it 'collapses large diffs by default' do - expect(large_diff).not_to have_selector('.code') - expect(large_diff).to have_selector('.nothing-here-block') - end - - it 'collapses large diffs for renamed files by default' do - expect(large_diff_renamed).not_to have_selector('.code') - expect(large_diff_renamed).to have_selector('.nothing-here-block') - expect(large_diff_renamed).to have_selector('.js-file-title .deletion') - expect(large_diff_renamed).to have_selector('.js-file-title .addition') - end - it 'shows non-renderable diffs as such immediately, regardless of their size' do expect(undiffable).not_to have_selector('.code') expect(undiffable).to have_selector('.nothing-here-block') |