Commit 44571af0 authored by Nick Thomas's avatar Nick Thomas

Fix search result highlighting when using elasticsearch

parent 47730ce0
......@@ -95,7 +95,7 @@ module Gitlab
data = content.lines[from..to]
OpenStruct.new(
::Gitlab::SearchResults::FoundBlob.new(
filename: filename,
basename: basename,
ref: ref,
......
......@@ -45,12 +45,14 @@ feature 'Global elastic search', feature: true do
it "finds files" do
visit dashboard_projects_path
fill_in "search", with: "def"
fill_in "search", with: "application.js"
click_button "Go"
select_filter("Code")
expect(page).to have_selector('.file-content .code')
expect(page).to have_selector("span.line[lang='javascript']")
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