Commit b9db3fbf authored by Dmitry Gruzd's avatar Dmitry Gruzd Committed by Natalia Tepluhina

Add updated_at to epics search results

parent 83a59b9c
......@@ -9,6 +9,8 @@
%span.term.str-truncated.gl-font-weight-bold.gl-ml-2= epic.title
.gl-text-gray-500.gl-my-3
= sprintf(s_('%{group_name}&%{epic_iid} · created %{epic_created} by %{author}'), { group_name: epic.group.full_name, epic_iid: epic.iid, epic_created: time_ago_with_tooltip(epic.created_at, placement: 'bottom'), author: link_to_member(@project, epic.author, avatar: false) }).html_safe
·
= _('updated %{time_ago}').html_safe % { time_ago: time_ago_with_tooltip(epic.updated_at, placement: 'bottom') }
- if epic.description.present?
.description.term.col-sm-10.gl-px-0
= truncate(epic.description, length: 200)
......@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe 'User searches for epics', :js do
let!(:user) { create(:user) }
let!(:group) { create(:group) }
let!(:epic1) { create(:epic, title: 'Foo', group: group) }
let!(:epic1) { create(:epic, title: 'Foo', group: group, updated_at: 6.days.ago) }
let!(:epic2) { create(:epic, :closed, :confidential, title: 'Bar', group: group) }
def search_for_epic(search)
......@@ -30,6 +30,7 @@ RSpec.describe 'User searches for epics', :js do
page.within('.results') do
expect(page).to have_link(epic1.title)
expect(page).to have_text('updated 6 days ago')
expect(page).not_to have_link(epic2.title)
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