diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/features/merge_request/user_sees_diff_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/features/merge_request/user_sees_diff_spec.rb')
-rw-r--r-- | spec/features/merge_request/user_sees_diff_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/merge_request/user_sees_diff_spec.rb b/spec/features/merge_request/user_sees_diff_spec.rb index 2e65183d26f..0bae019793c 100644 --- a/spec/features/merge_request/user_sees_diff_spec.rb +++ b/spec/features/merge_request/user_sees_diff_spec.rb @@ -38,6 +38,20 @@ RSpec.describe 'Merge request > User sees diff', :js do end end + context 'when linking to a line' do + let(:note) { create :diff_note_on_merge_request, project: project, noteable: merge_request } + let(:line) { note.diff_file.highlighted_diff_lines.last } + let(:line_code) { line.line_code } + + before do + visit "#{diffs_project_merge_request_path(project, merge_request)}##{line_code}" + end + + it 'shows the linked line' do + expect(page).to have_selector("[id='#{line_code}']", visible: true, obscured: false) + end + end + context 'when merge request has overflow' do it 'displays warning' do allow(Commit).to receive(:max_diff_options).and_return(max_files: 3) |