Commit 19351219 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'jswain_whats_new' into 'master'

Add "whats new" item to help dropdown

See merge request gitlab-org/gitlab!29183
parents 0620215f c648829d
%ul
- if current_user_menu?(:help)
= render_if_exists 'layouts/header/whats_new_dropdown_item'
%li
= link_to _("Help"), help_path
%li
......
......@@ -117,6 +117,10 @@ module EE
allow_access_to_onboarding?
end
def show_whats_new_dropdown_item?
::Gitlab.com? && ::Feature.enabled?(:whats_new_dropdown)
end
private
def appearance
......
- if show_whats_new_dropdown_item?
%li
= link_to _("See what's new at GitLab"), "#{promo_url}/releases/categories/releases/", target: '_blank', rel: 'noopener noreferrer', data: { track_event: 'click_whats_new', track_property: 'question_menu' }
---
title: Add "whats new" item to help dropdown
merge_request: 29183
author:
type: added
......@@ -187,4 +187,26 @@ describe ApplicationHelper do
end
end
end
describe '#show_whats_new_dropdown_item?' do
using RSpec::Parameterized::TableSyntax
subject { helper.show_whats_new_dropdown_item? }
where(:feature_flag, :gitlab_com, :result) do
true | true | true
true | false | false
false | true | false
false | false | false
end
with_them do
before do
stub_feature_flags(whats_new_dropdown: feature_flag)
allow(::Gitlab).to receive(:com?).and_return(gitlab_com)
end
it { is_expected.to be(result) }
end
end
end
......@@ -18252,6 +18252,9 @@ msgstr ""
msgid "See the affected projects in the GitLab admin panel"
msgstr ""
msgid "See what's new at GitLab"
msgstr ""
msgid "Select"
msgstr ""
......
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