blob: 20a5910e66deae64542c7c338840192e83fc2669 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'User views diffs file-by-file', :js do
let(:merge_request) do
create(:merge_request, source_branch: 'squash-large-files', source_project: project, target_project: project)
end
let(:project) { create(:project, :repository) }
let(:user) { create(:user, view_diffs_file_by_file: true) }
before do
allow(Gitlab::Git::Diff).to receive(:size_limit).and_return(100.kilobytes)
allow(Gitlab::Git::Diff).to receive(:collapse_limit).and_return(10.kilobytes)
project.add_developer(user)
sign_in(user)
visit(diffs_project_merge_request_path(project, merge_request, anchor: '5091f7b9dd6202e37eaedd73d7b75d82f25fdb61'))
wait_for_requests
end
it 'shows diffs file-by-file' do
page.within('#diffs') do
expect(page).not_to have_content('This diff is collapsed')
click_button 'Next'
expect(page).not_to have_content('This diff is collapsed')
end
end
end
|