Commit e94e5878 authored by Sean McGivern's avatar Sean McGivern

Merge branch '337965-remove-experiment-word-for-continuous-onboarding' into 'master'

Remove experiment word from continuous onboarding

See merge request gitlab-org/gitlab!69991
parents 52b02359 93529874
......@@ -12,6 +12,6 @@ class Projects::LearnGitlabController < Projects::ApplicationController
private
def check_experiment_enabled?
return access_denied! unless helpers.learn_gitlab_experiment_enabled?(project)
return access_denied! unless helpers.learn_gitlab_enabled?(project)
end
end
# frozen_string_literal: true
module LearnGitlabHelper
def learn_gitlab_experiment_enabled?(project)
def learn_gitlab_enabled?(project)
return false unless current_user
learn_gitlab_onboarding_available?(project)
......
......@@ -87,7 +87,7 @@ module SidebarsHelper
{
current_user: user,
container: project,
learn_gitlab_experiment_enabled: learn_gitlab_experiment_enabled?(project),
learn_gitlab_enabled: learn_gitlab_enabled?(project),
current_ref: current_ref,
jira_issues_integration: project_jira_issues_integration?,
can_view_pipeline_editor: can_view_pipeline_editor?(project),
......
......@@ -23,7 +23,7 @@ module Sidebars
override :has_pill?
def has_pill?
context.learn_gitlab_experiment_enabled
context.learn_gitlab_enabled
end
override :pill_count
......@@ -52,7 +52,7 @@ module Sidebars
override :render?
def render?
context.learn_gitlab_experiment_enabled
context.learn_gitlab_enabled
end
end
end
......
......@@ -7,13 +7,13 @@ RSpec.describe Projects::LearnGitlabController do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, namespace: user.namespace) }
let(:learn_gitlab_experiment_enabled) { true }
let(:learn_gitlab_enabled) { true }
let(:params) { { namespace_id: project.namespace.to_param, project_id: project } }
subject { get :index, params: params }
before do
allow(controller.helpers).to receive(:learn_gitlab_experiment_enabled?).and_return(learn_gitlab_experiment_enabled)
allow(controller.helpers).to receive(:learn_gitlab_enabled?).and_return(learn_gitlab_enabled)
end
context 'unauthenticated user' do
......@@ -28,7 +28,7 @@ RSpec.describe Projects::LearnGitlabController do
it { is_expected.to render_template(:index) }
context 'learn_gitlab experiment not enabled' do
let(:learn_gitlab_experiment_enabled) { false }
let(:learn_gitlab_enabled) { false }
it { is_expected.to have_gitlab_http_status(:not_found) }
end
......
......@@ -53,7 +53,7 @@ RSpec.describe LearnGitlabHelper do
end
end
describe '.learn_gitlab_experiment_enabled?' do
describe '.learn_gitlab_enabled?' do
using RSpec::Parameterized::TableSyntax
let_it_be(:user) { create(:user) }
......@@ -61,7 +61,7 @@ RSpec.describe LearnGitlabHelper do
let(:params) { { namespace_id: project.namespace.to_param, project_id: project } }
subject { helper.learn_gitlab_experiment_enabled?(project) }
subject { helper.learn_gitlab_enabled?(project) }
where(:onboarding, :learn_gitlab_available, :result) do
true | true | true
......
......@@ -4,13 +4,13 @@ require 'spec_helper'
RSpec.describe Sidebars::Projects::Menus::LearnGitlabMenu do
let_it_be(:project) { build(:project) }
let_it_be(:experiment_enabled) { true }
let_it_be(:learn_gitlab_enabled) { true }
let(:context) do
Sidebars::Projects::Context.new(
current_user: nil,
container: project,
learn_gitlab_experiment_enabled: experiment_enabled
learn_gitlab_enabled: learn_gitlab_enabled
)
end
......@@ -43,7 +43,7 @@ RSpec.describe Sidebars::Projects::Menus::LearnGitlabMenu do
end
context 'when learn gitlab experiment is disabled' do
let(:experiment_enabled) { false }
let(:learn_gitlab_enabled) { false }
it 'returns false' do
expect(subject.render?).to eq false
......@@ -59,7 +59,7 @@ RSpec.describe Sidebars::Projects::Menus::LearnGitlabMenu do
end
context 'when learn gitlab experiment is disabled' do
let(:experiment_enabled) { false }
let(:learn_gitlab_enabled) { false }
it 'returns false' do
expect(subject.has_pill?).to eq false
......
......@@ -68,8 +68,8 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
end
describe 'Learn GitLab' do
it 'has a link to the learn GitLab experiment' do
allow(view).to receive(:learn_gitlab_experiment_enabled?).and_return(true)
it 'has a link to the learn GitLab' do
allow(view).to receive(:learn_gitlab_enabled?).and_return(true)
allow_next_instance_of(LearnGitlab::Onboarding) do |onboarding|
expect(onboarding).to receive(:completed_percentage).and_return(20)
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