Commit 7158662c authored by Etienne Baqué's avatar Etienne Baqué

Merge branch...

Merge branch '321185-experiment-cleanup-invite_members_version_a-add-invite-members-to-assignees-dropdown' into 'master'

Cleanup invite_members_version_a experiment [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!55178
parents 94010e3d dd98a637
......@@ -53,7 +53,6 @@ class Projects::IssuesController < Projects::ApplicationController
push_to_gon_attributes(:features, real_time_feature_flag, real_time_enabled)
push_frontend_feature_flag(:confidential_notes, @project, default_enabled: :yaml)
record_experiment_user(:invite_members_version_a)
record_experiment_user(:invite_members_version_b)
end
......
......@@ -44,7 +44,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:paginated_notes, @project, default_enabled: :yaml)
push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml)
record_experiment_user(:invite_members_version_a)
record_experiment_user(:invite_members_version_b)
end
......
......@@ -13,7 +13,7 @@ module InviteMembersHelper
def directly_invite_members?
strong_memoize(:directly_invite_members) do
experiment_enabled?(:invite_members_version_a) && can_import_members?
can_import_members?
end
end
......
......@@ -39,17 +39,4 @@
- data['max-select'] = dropdown_options[:data][:'max-select'] if dropdown_options[:data][:'max-select']
- options[:data].merge!(data)
- if experiment_enabled?(:invite_members_version_a) && can_import_members?
- options[:dropdown_class] += ' dropdown-extended-height'
- options[:footer_content] = true
- options[:wrapper_class] = 'js-sidebar-reviewer-dropdown'
= dropdown_tag(title, options: options) do
%ul.dropdown-footer-list
%li
= link_to _('Invite Members'),
project_project_members_path(@project),
title: _('Invite Members'),
data: { 'is-link': true, 'track-event': 'click_invite_members', 'track-label': 'edit_reviewer' }
- else
= dropdown_tag(title, options: options)
---
title: Cleanup invite_members_version_a experiment
merge_request: 55178
author:
type: added
---
name: invite_members_version_a_experiment_percentage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33210
rollout_issue_url: https://gitlab.com/gitlab-org/growth/team-tasks/-/issues/299
milestone: '13.1'
type: experiment
group: group::expansion
default_enabled: false
......@@ -38,10 +38,6 @@ module Gitlab
tracking_category: 'Growth::Expansion::Experiment::UpgradeLinkInUserMenuA',
use_backwards_compatible_subject_index: true
},
invite_members_version_a: {
tracking_category: 'Growth::Expansion::Experiment::InviteMembersVersionA',
use_backwards_compatible_subject_index: true
},
invite_members_version_b: {
tracking_category: 'Growth::Expansion::Experiment::InviteMembersVersionB',
use_backwards_compatible_subject_index: true
......
......@@ -71,15 +71,7 @@ RSpec.describe InviteMembersHelper do
allow(helper).to receive(:current_user) { owner }
end
it 'returns false' do
allow(helper).to receive(:experiment_enabled?).with(:invite_members_version_a) { false }
expect(helper.directly_invite_members?).to eq false
end
it 'returns true' do
allow(helper).to receive(:experiment_enabled?).with(:invite_members_version_a) { true }
expect(helper.directly_invite_members?).to eq true
end
end
......@@ -90,8 +82,6 @@ RSpec.describe InviteMembersHelper do
end
it 'returns false' do
allow(helper).to receive(:experiment_enabled?).with(:invite_members_version_a) { true }
expect(helper.directly_invite_members?).to eq false
end
end
......
......@@ -8,7 +8,6 @@ RSpec.describe Gitlab::Experimentation::EXPERIMENTS do
it 'temporarily ensures we know what experiments exist for backwards compatibility' do
expected_experiment_keys = [
:upgrade_link_in_user_menu_a,
:invite_members_version_a,
:invite_members_version_b,
:invite_members_empty_group_version_a,
:contact_sales_btn_in_app
......
# frozen_string_literal: true
RSpec.shared_examples 'issuable invite members experiments' do
context 'when invite_members_version_a experiment is enabled' do
before do
stub_experiment_for_subject(invite_members_version_a: true)
end
context 'when a privileged user can invite' do
it 'shows a link for inviting members and follows through to the members page' do
project.add_maintainer(user)
visit issuable_path
......@@ -51,9 +47,9 @@ RSpec.shared_examples 'issuable invite members experiments' do
end
end
context 'when no invite members experiments are enabled' do
context 'when invite_members_version_b experiment is disabled' do
it 'shows author in assignee dropdown and no invite link' do
project.add_maintainer(user)
project.add_developer(user)
visit issuable_path
find('.block.assignee .edit-link').click
......
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