Commit c28746bc authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch...

Merge branch '335838-experiment-cleanup-remove-invite-team-members-cta-to-the-group-empty-state' into 'master'

Remove "Invite team members" CTA from group empty state

See merge request gitlab-org/gitlab!68370
parents b359579d 857d2eac
...@@ -206,8 +206,6 @@ class GroupsController < Groups::ApplicationController ...@@ -206,8 +206,6 @@ class GroupsController < Groups::ApplicationController
protected protected
def render_show_html def render_show_html
record_experiment_user(:invite_members_empty_group_version_a) if ::Gitlab.com?
render 'groups/show', locals: { trial: params[:trial] } render 'groups/show', locals: { trial: params[:trial] }
end end
......
...@@ -17,10 +17,6 @@ module InviteMembersHelper ...@@ -17,10 +17,6 @@ module InviteMembersHelper
end end
end end
def invite_group_members?(group)
experiment_enabled?(:invite_members_empty_group_version_a) && Ability.allowed?(current_user, :admin_group_member, group)
end
def invite_accepted_notice(member) def invite_accepted_notice(member)
case member.source case member.source
when Project when Project
......
...@@ -6,8 +6,3 @@ ...@@ -6,8 +6,3 @@
%h4= s_("GroupsEmptyState|A group is a collection of several projects.") %h4= s_("GroupsEmptyState|A group is a collection of several projects.")
%p= s_("GroupsEmptyState|If you organize your projects under a group, it works like a folder.") %p= s_("GroupsEmptyState|If you organize your projects under a group, it works like a folder.")
%p= s_("GroupsEmptyState|You can manage your group member’s permissions and access to each project in the group.") %p= s_("GroupsEmptyState|You can manage your group member’s permissions and access to each project in the group.")
- if invite_group_members?(@group)
= link_to _('Invite your team'),
group_group_members_path(@group),
class: 'gl-button btn btn-confirm-secondary',
data: { track_event: 'click_invite_team_group_empty_state', track_label: 'invite_team_group_empty_state' }
---
name: invite_members_empty_group_version_a_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45689
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/280
milestone: '13.6'
type: experiment
group: group::expansion
default_enabled: false
...@@ -34,10 +34,6 @@ ...@@ -34,10 +34,6 @@
module Gitlab module Gitlab
module Experimentation module Experimentation
EXPERIMENTS = { EXPERIMENTS = {
invite_members_empty_group_version_a: {
tracking_category: 'Growth::Expansion::Experiment::InviteMembersEmptyGroupVersionA',
use_backwards_compatible_subject_index: true
},
remove_known_trial_form_fields_welcoming: { remove_known_trial_form_fields_welcoming: {
tracking_category: 'Growth::Conversion::Experiment::RemoveKnownTrialFormFieldsWelcoming', tracking_category: 'Growth::Conversion::Experiment::RemoveKnownTrialFormFieldsWelcoming',
rollout_strategy: :user rollout_strategy: :user
......
...@@ -18218,9 +18218,6 @@ msgstr "" ...@@ -18218,9 +18218,6 @@ msgstr ""
msgid "Invite members" msgid "Invite members"
msgstr "" msgstr ""
msgid "Invite your team"
msgstr ""
msgid "InviteEmail|%{inviter} invited you to join the %{project_or_group_name} %{project_or_group} as a %{role}" msgid "InviteEmail|%{inviter} invited you to join the %{project_or_group_name} %{project_or_group} as a %{role}"
msgstr "" msgstr ""
......
...@@ -126,42 +126,4 @@ RSpec.describe InviteMembersHelper do ...@@ -126,42 +126,4 @@ RSpec.describe InviteMembersHelper do
end end
end end
end end
context 'with group' do
let_it_be(:group) { create(:group) }
describe "#invite_group_members?" do
context 'when the user is an owner' do
before do
group.add_owner(owner)
allow(helper).to receive(:current_user) { owner }
end
it 'returns false' do
allow(helper).to receive(:experiment_enabled?).with(:invite_members_empty_group_version_a) { false }
expect(helper.invite_group_members?(group)).to eq false
end
it 'returns true' do
allow(helper).to receive(:experiment_enabled?).with(:invite_members_empty_group_version_a) { true }
expect(helper.invite_group_members?(group)).to eq true
end
end
context 'when the user is a developer' do
before do
group.add_developer(developer)
allow(helper).to receive(:current_user) { developer }
end
it 'returns false' do
allow(helper).to receive(:experiment_enabled?).with(:invite_members_empty_group_version_a) { true }
expect(helper.invite_group_members?(group)).to eq false
end
end
end
end
end end
...@@ -2,19 +2,6 @@ ...@@ -2,19 +2,6 @@
require 'spec_helper' require 'spec_helper'
# As each associated, backwards-compatible experiment gets cleaned up and removed from the EXPERIMENTS list, its key will also get removed from this list. Once the list here is empty, we can remove the backwards compatibility code altogether.
# Originally created as part of https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45733 for https://gitlab.com/gitlab-org/gitlab/-/issues/270858.
RSpec.describe Gitlab::Experimentation::EXPERIMENTS do
it 'temporarily ensures we know what experiments exist for backwards compatibility' do
expected_experiment_keys = [:invite_members_empty_group_version_a]
backwards_compatible_experiment_keys = described_class.filter { |_, v| v[:use_backwards_compatible_subject_index] }.keys
expect(backwards_compatible_experiment_keys).not_to be_empty, "Oh, hey! Let's clean up that :use_backwards_compatible_subject_index stuff now :D"
expect(backwards_compatible_experiment_keys).to match(expected_experiment_keys)
end
end
RSpec.describe Gitlab::Experimentation do RSpec.describe Gitlab::Experimentation do
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
......
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