Commit 390eb00c authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'sy-successful-cleanup-confetti_post_signup-experiment' into 'master'

Successful cleanup confetti_post_signup experiment

See merge request gitlab-org/gitlab!82299
parents c168932c a1ff36f7
...@@ -27,11 +27,6 @@ export default { ...@@ -27,11 +27,6 @@ export default {
required: true, required: true,
type: Object, type: Object,
}, },
inviteMembers: {
type: Boolean,
required: false,
default: false,
},
project: { project: {
required: true, required: true,
type: Object, type: Object,
...@@ -54,7 +49,7 @@ export default { ...@@ -54,7 +49,7 @@ export default {
}, },
}, },
mounted() { mounted() {
if (this.inviteMembers && this.getCookieForInviteMembers()) { if (this.getCookieForInviteMembers()) {
this.openInviteMembersModal('celebrate'); this.openInviteMembersModal('celebrate');
} }
......
import Vue from 'vue'; import Vue from 'vue';
import initInviteMembersModal from '~/invite_members/init_invite_members_modal'; import initInviteMembersModal from '~/invite_members/init_invite_members_modal';
import { convertObjectPropsToCamelCase, parseBoolean } from '~/lib/utils/common_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import LearnGitlab from '../components/learn_gitlab.vue'; import LearnGitlab from '../components/learn_gitlab.vue';
function initLearnGitlab() { function initLearnGitlab() {
...@@ -13,13 +13,12 @@ function initLearnGitlab() { ...@@ -13,13 +13,12 @@ function initLearnGitlab() {
const actions = convertObjectPropsToCamelCase(JSON.parse(el.dataset.actions)); const actions = convertObjectPropsToCamelCase(JSON.parse(el.dataset.actions));
const sections = convertObjectPropsToCamelCase(JSON.parse(el.dataset.sections)); const sections = convertObjectPropsToCamelCase(JSON.parse(el.dataset.sections));
const project = convertObjectPropsToCamelCase(JSON.parse(el.dataset.project)); const project = convertObjectPropsToCamelCase(JSON.parse(el.dataset.project));
const { inviteMembers } = el.dataset;
return new Vue({ return new Vue({
el, el,
render(createElement) { render(createElement) {
return createElement(LearnGitlab, { return createElement(LearnGitlab, {
props: { actions, sections, project, inviteMembers: parseBoolean(inviteMembers) }, props: { actions, sections, project },
}); });
}, },
}); });
......
...@@ -5,8 +5,4 @@ ...@@ -5,8 +5,4 @@
= render 'projects/invite_members_modal', project: @project = render 'projects/invite_members_modal', project: @project
- experiment(:confetti_post_signup, actor: current_user) do |e| #js-learn-gitlab-app{ data: data }
- e.control do
#js-learn-gitlab-app{ data: data }
- e.candidate do
#js-learn-gitlab-app{ data: data.merge(invite_members: 'true') }
---
name: confetti_post_signup
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70011
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/339890
milestone: '14.5'
type: experiment
group: group::expansion
default_enabled: false
...@@ -40,47 +40,6 @@ RSpec.describe 'User sees new onboarding flow', :js do ...@@ -40,47 +40,6 @@ RSpec.describe 'User sees new onboarding flow', :js do
click_on "Ok, let's go" click_on "Ok, let's go"
expect(page).to have_content('Learn GitLab') expect(page).to have_content('Learn GitLab')
end expect(page).to have_content('GitLab is better with colleagues!')
context 'with confetti_post_signup experiment candidate experience', :experiment do
before do
stub_experiments(change_continuous_onboarding_link_urls: :control,
combined_registration: :control,
confetti_post_signup: :candidate)
end
it 'shows continuous onboarding flow pages with celebration invite modal' do
sign_in(create(:user))
visit users_sign_up_welcome_path
expect(page).to have_content('Welcome to GitLab')
choose 'Just me'
click_on 'Continue'
expect(page).to have_content('Create your group')
fill_in 'group_name', with: 'test'
expect(page).to have_field('group_path', with: 'test')
click_on 'Create group'
expect(page).to have_content('Create/import your first project')
fill_in 'project_name', with: 'test'
expect(page).to have_field('project_path', with: 'test')
click_on 'Create project'
expect(page).to have_content('Get started with GitLab')
Sidekiq::Worker.drain_all
click_on "Ok, let's go"
expect(page).to have_content('Learn GitLab')
expect(page).to have_content('GitLab is better with colleagues!')
end
end end
end end
...@@ -9,7 +9,6 @@ import { testActions, testSections, testProject } from './mock_data'; ...@@ -9,7 +9,6 @@ import { testActions, testSections, testProject } from './mock_data';
describe('Learn GitLab', () => { describe('Learn GitLab', () => {
let wrapper; let wrapper;
let sidebar; let sidebar;
let inviteMembers = false;
const createWrapper = () => { const createWrapper = () => {
wrapper = mount(LearnGitlab, { wrapper = mount(LearnGitlab, {
...@@ -17,7 +16,6 @@ describe('Learn GitLab', () => { ...@@ -17,7 +16,6 @@ describe('Learn GitLab', () => {
actions: testActions, actions: testActions,
sections: testSections, sections: testSections,
project: testProject, project: testProject,
inviteMembers,
}, },
}); });
}; };
...@@ -38,7 +36,6 @@ describe('Learn GitLab', () => { ...@@ -38,7 +36,6 @@ describe('Learn GitLab', () => {
afterEach(() => { afterEach(() => {
wrapper.destroy(); wrapper.destroy();
wrapper = null; wrapper = null;
inviteMembers = false;
sidebar.remove(); sidebar.remove();
}); });
...@@ -73,7 +70,6 @@ describe('Learn GitLab', () => { ...@@ -73,7 +70,6 @@ describe('Learn GitLab', () => {
}); });
it('emits openModal', () => { it('emits openModal', () => {
inviteMembers = true;
Cookies.set(INVITE_MODAL_OPEN_COOKIE, true); Cookies.set(INVITE_MODAL_OPEN_COOKIE, true);
createWrapper(); createWrapper();
...@@ -86,19 +82,11 @@ describe('Learn GitLab', () => { ...@@ -86,19 +82,11 @@ describe('Learn GitLab', () => {
}); });
it('does not emit openModal when cookie is not set', () => { it('does not emit openModal when cookie is not set', () => {
inviteMembers = true;
createWrapper(); createWrapper();
expect(spy).not.toHaveBeenCalled(); expect(spy).not.toHaveBeenCalled();
expect(cookieSpy).toHaveBeenCalledWith(INVITE_MODAL_OPEN_COOKIE); expect(cookieSpy).toHaveBeenCalledWith(INVITE_MODAL_OPEN_COOKIE);
}); });
it('does not emit openModal when inviteMembers is false', () => {
createWrapper();
expect(spy).not.toHaveBeenCalled();
});
}); });
describe('when the showSuccessfulInvitationsAlert event is fired', () => { describe('when the showSuccessfulInvitationsAlert event is fired', () => {
......
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