Commit 3d6d5913 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '352623-remove-unneeded-inviteetype' into 'master'

Remove unneeded `inviteeType` from invite members modal triggers

See merge request gitlab-org/gitlab!80639
parents ea5b0243 3e1f672d
...@@ -46,7 +46,6 @@ export default { ...@@ -46,7 +46,6 @@ export default {
}, },
openModal() { openModal() {
eventHub.$emit('openModal', { eventHub.$emit('openModal', {
inviteeType: 'members',
source: this.$options.openModalSource, source: this.$options.openModalSource,
}); });
this.track(this.$options.buttonClickEvent); this.track(this.$options.buttonClickEvent);
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
return this.triggerElement === targetTriggerElement; return this.triggerElement === targetTriggerElement;
}, },
openModal() { openModal() {
eventHub.$emit('openModal', { inviteeType: 'members', source: this.triggerSource }); eventHub.$emit('openModal', { source: this.triggerSource });
}, },
}, },
TRIGGER_ELEMENT_BUTTON, TRIGGER_ELEMENT_BUTTON,
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
return value; return value;
}, },
openInviteMembersModal(mode) { openInviteMembersModal(mode) {
eventHub.$emit('openModal', { mode, inviteeType: 'members', source: 'learn-gitlab' }); eventHub.$emit('openModal', { mode, source: 'learn-gitlab' });
}, },
handleShowSuccessfulInvitationsAlert() { handleShowSuccessfulInvitationsAlert() {
this.showSuccessfulInvitationsAlert = true; this.showSuccessfulInvitationsAlert = true;
......
...@@ -37,11 +37,7 @@ export default { ...@@ -37,11 +37,7 @@ export default {
}, },
methods: { methods: {
openModal() { openModal() {
eventHub.$emit('openModal', { eventHub.$emit('openModal', { source: 'learn_gitlab' });
inviteeType: 'members',
source: 'learn_gitlab',
tasksToBeDoneEnabled: true,
});
}, },
}, },
}; };
......
...@@ -76,7 +76,6 @@ describe('InviteMembersBanner', () => { ...@@ -76,7 +76,6 @@ describe('InviteMembersBanner', () => {
it('calls openModal through the eventHub', () => { it('calls openModal through the eventHub', () => {
expect(eventHub.$emit).toHaveBeenCalledWith('openModal', { expect(eventHub.$emit).toHaveBeenCalledWith('openModal', {
inviteeType: 'members',
source: 'invite_members_banner', source: 'invite_members_banner',
}); });
}); });
......
...@@ -694,7 +694,7 @@ describe('InviteMembersModal', () => { ...@@ -694,7 +694,7 @@ describe('InviteMembersModal', () => {
}); });
it('tracks the view for learn_gitlab source', () => { it('tracks the view for learn_gitlab source', () => {
eventHub.$emit('openModal', { inviteeType: 'members', source: LEARN_GITLAB }); eventHub.$emit('openModal', { source: LEARN_GITLAB });
expect(ExperimentTracking).toHaveBeenCalledWith(INVITE_MEMBERS_FOR_TASK.name); expect(ExperimentTracking).toHaveBeenCalledWith(INVITE_MEMBERS_FOR_TASK.name);
expect(ExperimentTracking.prototype.event).toHaveBeenCalledWith(LEARN_GITLAB); expect(ExperimentTracking.prototype.event).toHaveBeenCalledWith(LEARN_GITLAB);
......
...@@ -71,7 +71,6 @@ describe.each(triggerItems)('with triggerElement as %s', (triggerItem) => { ...@@ -71,7 +71,6 @@ describe.each(triggerItems)('with triggerElement as %s', (triggerItem) => {
findButton().vm.$emit('click'); findButton().vm.$emit('click');
expect(spy).toHaveBeenCalledWith('openModal', { expect(spy).toHaveBeenCalledWith('openModal', {
inviteeType: 'members',
source: triggerSource, source: triggerSource,
}); });
}); });
......
...@@ -114,11 +114,7 @@ describe('Learn GitLab Section Link', () => { ...@@ -114,11 +114,7 @@ describe('Learn GitLab Section Link', () => {
it('calls the eventHub', () => { it('calls the eventHub', () => {
openInviteMembesrModalLink().vm.$emit('click'); openInviteMembesrModalLink().vm.$emit('click');
expect(eventHub.$emit).toHaveBeenCalledWith('openModal', { expect(eventHub.$emit).toHaveBeenCalledWith('openModal', { source: 'learn_gitlab' });
inviteeType: 'members',
source: 'learn_gitlab',
tasksToBeDoneEnabled: true,
});
}); });
it('tracks the click', async () => { it('tracks the click', async () => {
......
...@@ -80,7 +80,6 @@ describe('Learn GitLab', () => { ...@@ -80,7 +80,6 @@ describe('Learn GitLab', () => {
expect(spy).toHaveBeenCalledWith('openModal', { expect(spy).toHaveBeenCalledWith('openModal', {
mode: 'celebrate', mode: 'celebrate',
inviteeType: 'members',
source: 'learn-gitlab', source: 'learn-gitlab',
}); });
expect(cookieSpy).toHaveBeenCalledWith(INVITE_MODAL_OPEN_COOKIE); expect(cookieSpy).toHaveBeenCalledWith(INVITE_MODAL_OPEN_COOKIE);
......
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