Commit 2ea50888 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'id-fix-diff-link-on-search' into 'master'

Fix blob link for the code search

See merge request gitlab-org/gitlab!30473
parents ee4518f5 44bc5a5c
......@@ -7,4 +7,4 @@
= search_blob_title(project, path)
- if blob.data
.file-content.code.term{ data: { qa_selector: 'file_text_content' } }
= render 'shared/file_highlight', blob: blob, first_line_number: blob.startline
= render 'shared/file_highlight', blob: blob, first_line_number: blob.startline, blob_link: blob_link
---
title: Fix blob link for the code search
merge_request: 30473
author:
type: fixed
......@@ -40,6 +40,9 @@ describe 'User searches for code' do
find('.btn-search').click
expect(page).to have_selector('.results', text: 'Update capybara, rspec-rails, poltergeist to recent versions')
find("#L3").click
expect(current_url).to match(/master\/.gitignore#L3/)
end
it 'search mutiple words with refs switching' do
......@@ -57,6 +60,7 @@ describe 'User searches for code' do
expect(page).to have_selector('.results', text: expected_result)
expect(find_field('dashboard_search').value).to eq(search)
expect(find("#L1502")[:href]).to match(/v1.0.0\/files\/markdown\/ruby-style-guide.md#L1502/)
end
end
......
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