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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 12:16:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-20 12:16:11 +0300
commitedaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch)
tree11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/features/user_sees_marketing_header_spec.rb
parentd8a5691316400a0f7ec4f83832698f1988eb27c1 (diff)
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/features/user_sees_marketing_header_spec.rb')
-rw-r--r--spec/features/user_sees_marketing_header_spec.rb69
1 files changed, 69 insertions, 0 deletions
diff --git a/spec/features/user_sees_marketing_header_spec.rb b/spec/features/user_sees_marketing_header_spec.rb
new file mode 100644
index 00000000000..31f088ce010
--- /dev/null
+++ b/spec/features/user_sees_marketing_header_spec.rb
@@ -0,0 +1,69 @@
+# frozen_string_literal: true
+
+require "spec_helper"
+
+RSpec.describe 'User sees experimental lmarketing header' do
+ let_it_be(:project) { create(:project, :public) }
+
+ context 'when not logged in' do
+ context 'when experiment candidate' do
+ it 'shows marketing header links', :aggregate_failures do
+ stub_experiments(logged_out_marketing_header: :candidate)
+
+ visit project_path(project)
+
+ expect(page).to have_text "About GitLab"
+ expect(page).to have_text "Pricing"
+ expect(page).to have_text "Talk to an expert"
+ expect(page).to have_text "Sign up now"
+ expect(page).to have_text "Login"
+ end
+ end
+
+ context 'when experiment candidate (trial focused variant)' do
+ it 'shows marketing header links', :aggregate_failures do
+ stub_experiments(logged_out_marketing_header: :trial_focused)
+
+ visit project_path(project)
+
+ expect(page).to have_text "About GitLab"
+ expect(page).to have_text "Pricing"
+ expect(page).to have_text "Talk to an expert"
+ expect(page).to have_text "Get a free trial"
+ expect(page).to have_text "Sign up"
+ expect(page).to have_text "Login"
+ end
+ end
+
+ context 'when experiment control' do
+ it 'does not show marketing header links', :aggregate_failures do
+ stub_experiments(logged_out_marketing_header: :control)
+
+ visit project_path(project)
+
+ expect(page).not_to have_text "About GitLab"
+ expect(page).not_to have_text "Pricing"
+ expect(page).not_to have_text "Talk to an expert"
+ expect(page).not_to have_text "Sign up now"
+ expect(page).not_to have_text "Login"
+ expect(page).not_to have_text "Get a free trial"
+ expect(page).not_to have_text "Sign up"
+ expect(page).to have_text "Sign in / Register"
+ end
+ end
+ end
+
+ context 'when logged in' do
+ it 'does not show marketing header links', :aggregate_failures do
+ sign_in(create(:user))
+
+ stub_experiments(logged_out_marketing_header: :candidate)
+
+ visit project_path(project)
+
+ expect(page).not_to have_text "About GitLab"
+ expect(page).not_to have_text "Pricing"
+ expect(page).not_to have_text "Talk to an expert"
+ end
+ end
+end