Commit 44bc5a5c authored by Igor Drozdov's avatar Igor Drozdov

Fix blob link for the code search

parent 55924c93
......@@ -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