Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/whats_new_spec.rb')
-rw-r--r--spec/features/whats_new_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/whats_new_spec.rb b/spec/features/whats_new_spec.rb
index 55b96361f03..2938ea1b1e8 100644
--- a/spec/features/whats_new_spec.rb
+++ b/spec/features/whats_new_spec.rb
@@ -34,6 +34,24 @@ RSpec.describe "renders a `whats new` dropdown item" do
sign_in(user)
end
+ it 'renders dropdown item when feature enabled' do
+ Gitlab::CurrentSettings.update!(whats_new_variant: ApplicationSetting.whats_new_variants[:all_tiers])
+
+ visit root_dashboard_path
+ find('.header-help-dropdown-toggle').click
+
+ expect(page).to have_button(text: "What's new")
+ end
+
+ it 'does not render dropdown item when feature disabled' do
+ Gitlab::CurrentSettings.update!(whats_new_variant: ApplicationSetting.whats_new_variants[:disabled])
+
+ visit root_dashboard_path
+ find('.header-help-dropdown-toggle').click
+
+ expect(page).not_to have_button(text: "What's new")
+ end
+
it 'shows notification dot and count and removes it once viewed' do
visit root_dashboard_path