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>2021-08-06 21:09:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-06 21:09:57 +0300
commit7e75943bd8ade38611f7b953aa3b4e664bbcb7a8 (patch)
tree9b239cf93da408561c17b04bc80eac4f492832f8 /spec/features/invites_spec.rb
parent07e0fae35c51cff088d6b2cbc6d844f421e16617 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/invites_spec.rb')
-rw-r--r--spec/features/invites_spec.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/features/invites_spec.rb b/spec/features/invites_spec.rb
index fdd822ef25b..d56bedd4852 100644
--- a/spec/features/invites_spec.rb
+++ b/spec/features/invites_spec.rb
@@ -141,6 +141,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
let(:invite_email) { new_user.email }
let(:group_invite) { create(:group_member, :invited, group: group, invite_email: invite_email, created_by: owner) }
let(:send_email_confirmation) { true }
+ let(:extra_params) { { invite_type: Emails::Members::INITIAL_INVITE } }
before do
stub_application_setting(send_user_confirmation_email: send_email_confirmation)
@@ -148,7 +149,7 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
context 'when registering using invitation email' do
before do
- visit invite_path(group_invite.raw_invite_token, invite_type: Emails::Members::INITIAL_INVITE)
+ visit invite_path(group_invite.raw_invite_token, extra_params)
end
context 'with admin approval required enabled' do
@@ -201,6 +202,20 @@ RSpec.describe 'Group or Project invitations', :aggregate_failures do
end
end
+ context 'with invite email acceptance for the invite_email_preview_text experiment', :experiment do
+ let(:extra_params) do
+ { invite_type: Emails::Members::INITIAL_INVITE, experiment_name: 'invite_email_preview_text' }
+ end
+
+ it 'tracks the accepted invite' do
+ expect(experiment(:invite_email_preview_text)).to track(:accepted)
+ .with_context(actor: group_invite)
+ .on_next_instance
+
+ fill_in_sign_up_form(new_user)
+ end
+ end
+
it 'signs up and redirects to the group activity page with all the project/groups invitation automatically accepted' do
fill_in_sign_up_form(new_user)
fill_in_welcome_form