Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
44bc5a5c
Commit
44bc5a5c
authored
Apr 27, 2020
by
Igor Drozdov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix blob link for the code search
parent
55924c93
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
app/views/search/results/_blob_data.html.haml
app/views/search/results/_blob_data.html.haml
+1
-1
changelogs/unreleased/id-fix-diff-link-on-search.yml
changelogs/unreleased/id-fix-diff-link-on-search.yml
+5
-0
spec/features/search/user_searches_for_code_spec.rb
spec/features/search/user_searches_for_code_spec.rb
+4
-0
No files found.
app/views/search/results/_blob_data.html.haml
View file @
44bc5a5c
...
@@ -7,4 +7,4 @@
...
@@ -7,4 +7,4 @@
=
search_blob_title
(
project
,
path
)
=
search_blob_title
(
project
,
path
)
-
if
blob
.
data
-
if
blob
.
data
.file-content.code.term
{
data:
{
qa_selector:
'file_text_content'
}
}
.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
changelogs/unreleased/id-fix-diff-link-on-search.yml
0 → 100644
View file @
44bc5a5c
---
title
:
Fix blob link for the code search
merge_request
:
30473
author
:
type
:
fixed
spec/features/search/user_searches_for_code_spec.rb
View file @
44bc5a5c
...
@@ -40,6 +40,9 @@ describe 'User searches for code' do
...
@@ -40,6 +40,9 @@ describe 'User searches for code' do
find
(
'.btn-search'
).
click
find
(
'.btn-search'
).
click
expect
(
page
).
to
have_selector
(
'.results'
,
text:
'Update capybara, rspec-rails, poltergeist to recent versions'
)
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
end
it
'search mutiple words with refs switching'
do
it
'search mutiple words with refs switching'
do
...
@@ -57,6 +60,7 @@ describe 'User searches for code' do
...
@@ -57,6 +60,7 @@ describe 'User searches for code' do
expect
(
page
).
to
have_selector
(
'.results'
,
text:
expected_result
)
expect
(
page
).
to
have_selector
(
'.results'
,
text:
expected_result
)
expect
(
find_field
(
'dashboard_search'
).
value
).
to
eq
(
search
)
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
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment