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