Commit e460a6dd authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'xanf-vtu-30-emit' into 'master'

Wrap emit calls to nextTick

Closes #38114

See merge request gitlab-org/gitlab!22323
parents 41537027 2ec90ad6
...@@ -270,6 +270,7 @@ describe('ProductivityApp component', () => { ...@@ -270,6 +270,7 @@ describe('ProductivityApp component', () => {
beforeEach(() => { beforeEach(() => {
jest.spyOn(store, 'dispatch'); jest.spyOn(store, 'dispatch');
findCommitBasedMetricChart().vm.$emit('metricTypeChange', 'loc_per_commit'); findCommitBasedMetricChart().vm.$emit('metricTypeChange', 'loc_per_commit');
return wrapper.vm.$nextTick();
}); });
it('should call setMetricType when `metricTypeChange` is emitted on the metric chart', () => { it('should call setMetricType when `metricTypeChange` is emitted on the metric chart', () => {
...@@ -326,6 +327,7 @@ describe('ProductivityApp component', () => { ...@@ -326,6 +327,7 @@ describe('ProductivityApp component', () => {
beforeEach(() => { beforeEach(() => {
jest.spyOn(store, 'dispatch'); jest.spyOn(store, 'dispatch');
findScatterplotMetricChart().vm.$emit('metricTypeChange', 'loc_per_commit'); findScatterplotMetricChart().vm.$emit('metricTypeChange', 'loc_per_commit');
return wrapper.vm.$nextTick();
}); });
it('should call setMetricType when `metricTypeChange` is emitted on the metric chart', () => { it('should call setMetricType when `metricTypeChange` is emitted on the metric chart', () => {
......
...@@ -79,7 +79,9 @@ describe('MergeRequestTable component', () => { ...@@ -79,7 +79,9 @@ describe('MergeRequestTable component', () => {
it('it emits the metric key when item is selected from the dropdown', () => { it('it emits the metric key when item is selected from the dropdown', () => {
findFirstDropdownItem().vm.$emit('click'); findFirstDropdownItem().vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().columnMetricChange[0]).toEqual(['time_to_first_comment']); expect(wrapper.emitted().columnMetricChange[0]).toEqual(['time_to_first_comment']);
}); });
}); });
});
}); });
...@@ -40,8 +40,11 @@ describe('DateRangeDropdown component', () => { ...@@ -40,8 +40,11 @@ describe('DateRangeDropdown component', () => {
it('emits the "selected" event with the selected item value', () => { it('emits the "selected" event with the selected item value', () => {
findFirstDropdownElement().vm.$emit('click'); findFirstDropdownElement().vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().selected[0]).toEqual([7]); expect(wrapper.emitted().selected[0]).toEqual([7]);
}); });
});
it('it renders the correct dropdown text when no item is selected', () => { it('it renders the correct dropdown text when no item is selected', () => {
expect(wrapper.vm.dropdownText).toBe('Select timeframe'); expect(wrapper.vm.dropdownText).toBe('Select timeframe');
......
...@@ -53,9 +53,11 @@ describe('Approvals ApproversListItem', () => { ...@@ -53,9 +53,11 @@ describe('Approvals ApproversListItem', () => {
const button = wrapper.find(GlButton); const button = wrapper.find(GlButton);
button.vm.$emit('click'); button.vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emittedByOrder()).toEqual([{ name: 'remove', args: [TEST_USER] }]); expect(wrapper.emittedByOrder()).toEqual([{ name: 'remove', args: [TEST_USER] }]);
}); });
}); });
});
describe('when group', () => { describe('when group', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -64,10 +64,12 @@ describe('ApproversList', () => { ...@@ -64,10 +64,12 @@ describe('ApproversList', () => {
const item = wrapper.findAll(ApproversListItem).at(idx); const item = wrapper.findAll(ApproversListItem).at(idx);
item.vm.$emit('remove', approver); item.vm.$emit('remove', approver);
return wrapper.vm.$nextTick().then(() => {
const expected = TEST_APPROVERS.filter((x, i) => i !== idx); const expected = TEST_APPROVERS.filter((x, i) => i !== idx);
expect(wrapper.emittedByOrder()).toEqual([{ name: 'input', args: [expected] }]); expect(wrapper.emittedByOrder()).toEqual([{ name: 'input', args: [expected] }]);
}); });
}); });
}); });
});
}); });
...@@ -42,9 +42,11 @@ describe('burndown_chart', () => { ...@@ -42,9 +42,11 @@ describe('burndown_chart', () => {
weightButton().vm.$emit('click'); weightButton().vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(issuesButton().attributes('variant')).toBe('inverted-primary'); expect(issuesButton().attributes('variant')).toBe('inverted-primary');
expect(weightButton().attributes('variant')).toBe('primary'); expect(weightButton().attributes('variant')).toBe('primary');
}); });
});
describe('with single point', () => { describe('with single point', () => {
it('does not show guideline', () => { it('does not show guideline', () => {
......
...@@ -39,8 +39,14 @@ describe('Batch delete button component', () => { ...@@ -39,8 +39,14 @@ describe('Batch delete button component', () => {
it('emits `deleteSelectedDesigns` event on modal ok click', () => { it('emits `deleteSelectedDesigns` event on modal ok click', () => {
createComponent(); createComponent();
findButton().vm.$emit('click'); findButton().vm.$emit('click');
return wrapper.vm
.$nextTick()
.then(() => {
findModal().vm.$emit('ok'); findModal().vm.$emit('ok');
return wrapper.vm.$nextTick();
})
.then(() => {
expect(wrapper.emitted().deleteSelectedDesigns).toBeTruthy(); expect(wrapper.emitted().deleteSelectedDesigns).toBeTruthy();
}); });
});
}); });
...@@ -87,7 +87,10 @@ describe('Project Header', () => { ...@@ -87,7 +87,10 @@ describe('Project Header', () => {
.at(0) .at(0)
.find(GlButton) .find(GlButton)
.vm.$emit('click'); .vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('remove')).toContainEqual([propsData.project.remove_path]); expect(wrapper.emitted('remove')).toContainEqual([propsData.project.remove_path]);
}); });
}); });
});
}); });
...@@ -210,8 +210,10 @@ describe('SidebarDatePicker', () => { ...@@ -210,8 +210,10 @@ describe('SidebarDatePicker', () => {
createComponent({ showToggleSidebar: true }); createComponent({ showToggleSidebar: true });
wrapper.find(ToggleSidebar).vm.$emit('toggle'); wrapper.find(ToggleSidebar).vm.$emit('toggle');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().toggleCollapse).toBeDefined(); expect(wrapper.emitted().toggleCollapse).toBeDefined();
}); });
});
it('renders expected template', () => { it('renders expected template', () => {
createComponent({ createComponent({
......
...@@ -29,8 +29,10 @@ describe('Configure Feature Flags Modal', () => { ...@@ -29,8 +29,10 @@ describe('Configure Feature Flags Modal', () => {
describe('rotate token', () => { describe('rotate token', () => {
it('should emit a `token` event on click', () => { it('should emit a `token` event on click', () => {
wrapper.find(GlButton).vm.$emit('click'); wrapper.find(GlButton).vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('token')).toEqual([[]]); expect(wrapper.emitted('token')).toEqual([[]]);
}); });
});
it('should display an error if there is a rotate error', () => { it('should display an error if there is a rotate error', () => {
wrapper.setProps({ hasRotateError: true }); wrapper.setProps({ hasRotateError: true });
......
...@@ -82,9 +82,11 @@ describe('Feature flags > Environments dropdown ', () => { ...@@ -82,9 +82,11 @@ describe('Feature flags > Environments dropdown ', () => {
.at(0); .at(0);
button.vm.$emit('click'); button.vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('selectEnvironment')).toEqual([['production']]); expect(wrapper.emitted('selectEnvironment')).toEqual([['production']]);
}); });
}); });
});
describe('on click clear button', () => { describe('on click clear button', () => {
beforeEach(() => { beforeEach(() => {
wrapper.find(GlButton).vm.$emit('click'); wrapper.find(GlButton).vm.$emit('click');
...@@ -118,7 +120,9 @@ describe('Feature flags > Environments dropdown ', () => { ...@@ -118,7 +120,9 @@ describe('Feature flags > Environments dropdown ', () => {
.at(1) .at(1)
.vm.$emit('click'); .vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('createClicked')).toEqual([['production']]); expect(wrapper.emitted('createClicked')).toEqual([['production']]);
}); });
}); });
});
}); });
...@@ -129,9 +129,11 @@ describe('Feature flag table', () => { ...@@ -129,9 +129,11 @@ describe('Feature flag table', () => {
toggle.vm.$emit('change'); toggle.vm.$emit('change');
const flag = { ...props.featureFlags[0], active: !props.featureFlags[0].active }; const flag = { ...props.featureFlags[0], active: !props.featureFlags[0].active };
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('toggle-flag')).toEqual([[flag]]); expect(wrapper.emitted('toggle-flag')).toEqual([[flag]]);
}); });
}); });
});
describe('with an active scope and a percentage rollout strategy', () => { describe('with an active scope and a percentage rollout strategy', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -49,8 +49,10 @@ describe('EE IDE TerminalControls', () => { ...@@ -49,8 +49,10 @@ describe('EE IDE TerminalControls', () => {
buttons.at(0).vm.$emit('click'); buttons.at(0).vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emittedByOrder()).toEqual([{ name: 'scroll-up', args: [] }]); expect(wrapper.emittedByOrder()).toEqual([{ name: 'scroll-up', args: [] }]);
}); });
});
it('emits "scroll-down" when click down button', () => { it('emits "scroll-down" when click down button', () => {
factory({ propsData: { canScrollDown: true } }); factory({ propsData: { canScrollDown: true } });
...@@ -59,6 +61,8 @@ describe('EE IDE TerminalControls', () => { ...@@ -59,6 +61,8 @@ describe('EE IDE TerminalControls', () => {
buttons.at(1).vm.$emit('click'); buttons.at(1).vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emittedByOrder()).toEqual([{ name: 'scroll-down', args: [] }]); expect(wrapper.emittedByOrder()).toEqual([{ name: 'scroll-down', args: [] }]);
}); });
});
}); });
...@@ -50,8 +50,10 @@ describe('LogControlButtons', () => { ...@@ -50,8 +50,10 @@ describe('LogControlButtons', () => {
findRefreshBtn().vm.$emit('click'); findRefreshBtn().vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('refresh')).toHaveLength(1); expect(wrapper.emitted('refresh')).toHaveLength(1);
}); });
});
describe('when scrolling actions are enabled', () => { describe('when scrolling actions are enabled', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -204,9 +204,11 @@ describe('AlertWidget', () => { ...@@ -204,9 +204,11 @@ describe('AlertWidget', () => {
findWidgetForm().vm.$emit('delete', { alert: alertPath }); findWidgetForm().vm.$emit('delete', { alert: alertPath });
return wrapper.vm.$nextTick().then(() => {
expect(mockDeleteAlert).toHaveBeenCalledWith(alertPath); expect(mockDeleteAlert).toHaveBeenCalledWith(alertPath);
expect(findAlertErrorMessage().exists()).toBe(false); expect(findAlertErrorMessage().exists()).toBe(false);
}); });
});
describe('when delete fails', () => { describe('when delete fails', () => {
beforeEach(() => { beforeEach(() => {
...@@ -227,6 +229,7 @@ describe('AlertWidget', () => { ...@@ -227,6 +229,7 @@ describe('AlertWidget', () => {
}); });
findWidgetForm().vm.$emit('delete', { alert: alertPath }); findWidgetForm().vm.$emit('delete', { alert: alertPath });
return wrapper.vm.$nextTick();
}); });
it('shows error message', () => { it('shows error message', () => {
......
...@@ -56,6 +56,7 @@ describe('project header component', () => { ...@@ -56,6 +56,7 @@ describe('project header component', () => {
it('emits project removal link on click', () => { it('emits project removal link on click', () => {
wrapper.find('.js-remove-button').vm.$emit('click'); wrapper.find('.js-remove-button').vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emittedByOrder()).toContainEqual( expect(wrapper.emittedByOrder()).toContainEqual(
expect.objectContaining({ expect.objectContaining({
name: 'remove', name: 'remove',
...@@ -64,6 +65,7 @@ describe('project header component', () => { ...@@ -64,6 +65,7 @@ describe('project header component', () => {
); );
}); });
}); });
});
describe('wrapped components', () => { describe('wrapped components', () => {
describe('project avatar', () => { describe('project avatar', () => {
......
...@@ -53,7 +53,10 @@ describe('ResetKey', () => { ...@@ -53,7 +53,10 @@ describe('ResetKey', () => {
vm.find(GlModal).vm.$emit('ok'); vm.find(GlModal).vm.$emit('ok');
return waitForPromises().then(() => { return vm.vm
.$nextTick()
.then(waitForPromises)
.then(() => {
expect(vm.vm.authorizationKey).toEqual('newToken'); expect(vm.vm.authorizationKey).toEqual('newToken');
expect(vm.find('#authorization-key').attributes('value')).toEqual('newToken'); expect(vm.find('#authorization-key').attributes('value')).toEqual('newToken');
}); });
...@@ -64,7 +67,10 @@ describe('ResetKey', () => { ...@@ -64,7 +67,10 @@ describe('ResetKey', () => {
vm.find(GlModal).vm.$emit('ok'); vm.find(GlModal).vm.$emit('ok');
return waitForPromises().then(() => { return vm.vm
.$nextTick()
.then(waitForPromises)
.then(() => {
expect(vm.find('#authorization-key').attributes('value')).toEqual( expect(vm.find('#authorization-key').attributes('value')).toEqual(
propsData.initialAuthorizationKey, propsData.initialAuthorizationKey,
); );
......
...@@ -92,6 +92,7 @@ describe('ThreatMonitoringApp component', () => { ...@@ -92,6 +92,7 @@ describe('ThreatMonitoringApp component', () => {
describe('dismissing the alert', () => { describe('dismissing the alert', () => {
beforeEach(() => { beforeEach(() => {
findAlert().vm.$emit('dismiss'); findAlert().vm.$emit('dismiss');
return wrapper.vm.$nextTick();
}); });
it('hides the alert', () => { it('hides the alert', () => {
......
...@@ -239,12 +239,15 @@ describe('ReadyToMerge', () => { ...@@ -239,12 +239,15 @@ describe('ReadyToMerge', () => {
it('should perform the merge when the user confirms their intent to merge immediately', () => { it('should perform the merge when the user confirms their intent to merge immediately', () => {
factory({ preferredAutoMergeStrategy: MT_MERGE_STRATEGY }); factory({ preferredAutoMergeStrategy: MT_MERGE_STRATEGY });
clickMergeImmediately(); return clickMergeImmediately()
.then(() => {
dialog.vm.$emit('mergeImmediately'); dialog.vm.$emit('mergeImmediately');
return wrapper.vm.$nextTick();
})
.then(() => {
expect(vm.handleMergeButtonClick).toHaveBeenCalled(); expect(vm.handleMergeButtonClick).toHaveBeenCalled();
}); });
});
it('should not ask for confirmation in non-merge train scenarios', () => { it('should not ask for confirmation in non-merge train scenarios', () => {
factory({ isPipelineActive: true, onlyAllowMergeIfPipelineSucceeds: false }); factory({ isPipelineActive: true, onlyAllowMergeIfPipelineSucceeds: false });
......
...@@ -79,9 +79,11 @@ describe('KnativeDomainEditor', () => { ...@@ -79,9 +79,11 @@ describe('KnativeDomainEditor', () => {
it('triggers save event and pass current knative hostname', () => { it('triggers save event and pass current knative hostname', () => {
wrapper.find(LoadingButton).vm.$emit('click'); wrapper.find(LoadingButton).vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('save')[0]).toEqual([knative.hostname]); expect(wrapper.emitted('save')[0]).toEqual([knative.hostname]);
}); });
}); });
});
describe('when knative domain name was saved successfully', () => { describe('when knative domain name was saved successfully', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -35,9 +35,10 @@ describe('UninstallApplicationConfirmationModal', () => { ...@@ -35,9 +35,10 @@ describe('UninstallApplicationConfirmationModal', () => {
wrapper.find(GlModal).vm.$emit('ok'); wrapper.find(GlModal).vm.$emit('ok');
}); });
it('emits confirm event', () => { it('emits confirm event', () =>
wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted('confirm')).toBeTruthy(); expect(wrapper.emitted('confirm')).toBeTruthy();
}); }));
it('calls track uninstall button click mixin', () => { it('calls track uninstall button click mixin', () => {
expect(wrapper.vm.trackUninstallButtonClick).toHaveBeenCalledWith(INGRESS); expect(wrapper.vm.trackUninstallButtonClick).toHaveBeenCalledWith(INGRESS);
......
...@@ -70,8 +70,10 @@ describe('CrossplaneProviderStack component', () => { ...@@ -70,8 +70,10 @@ describe('CrossplaneProviderStack component', () => {
}; };
createComponent({ crossplane }); createComponent({ crossplane });
findFirstDropdownElement().vm.$emit('click'); findFirstDropdownElement().vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().set[0][0].code).toEqual('gcp'); expect(wrapper.emitted().set[0][0].code).toEqual('gcp');
}); });
});
it('renders the correct dropdown text when no stack is selected', () => { it('renders the correct dropdown text when no stack is selected', () => {
expect(wrapper.vm.dropdownText).toBe('Select Stack'); expect(wrapper.vm.dropdownText).toBe('Select Stack');
......
...@@ -126,8 +126,10 @@ describe('DiffFileHeader component', () => { ...@@ -126,8 +126,10 @@ describe('DiffFileHeader component', () => {
it('when collapseIcon is clicked emits toggleFile', () => { it('when collapseIcon is clicked emits toggleFile', () => {
createComponent({ collapsible: true }); createComponent({ collapsible: true });
findCollapseIcon().vm.$emit('click', new Event('click')); findCollapseIcon().vm.$emit('click', new Event('click'));
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().toggleFile).toBeDefined(); expect(wrapper.emitted().toggleFile).toBeDefined();
}); });
});
it('when other element in header is clicked does not emits toggleFile', () => { it('when other element in header is clicked does not emits toggleFile', () => {
createComponent({ collapsible: true }); createComponent({ collapsible: true });
...@@ -200,8 +202,10 @@ describe('DiffFileHeader component', () => { ...@@ -200,8 +202,10 @@ describe('DiffFileHeader component', () => {
addMergeRequestButtons: true, addMergeRequestButtons: true,
}); });
wrapper.find(EditButton).vm.$emit('showForkMessage'); wrapper.find(EditButton).vm.$emit('showForkMessage');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().showForkMessage).toBeDefined(); expect(wrapper.emitted().showForkMessage).toBeDefined();
}); });
});
it('for mode_changed file mode displays mode changes', () => { it('for mode_changed file mode displays mode changes', () => {
createComponent({ createComponent({
......
...@@ -65,8 +65,10 @@ describe('IDE pipeline stage', () => { ...@@ -65,8 +65,10 @@ describe('IDE pipeline stage', () => {
.findAll(Item) .findAll(Item)
.at(0) .at(0)
.vm.$emit('clickViewLog', job); .vm.$emit('clickViewLog', job);
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().clickViewLog[0][0]).toBe(job); expect(wrapper.emitted().clickViewLog[0][0]).toBe(job);
}); });
});
it('renders stage details & icon', () => { it('renders stage details & icon', () => {
createComponent(); createComponent();
......
...@@ -119,19 +119,28 @@ describe('DiscussionNotes', () => { ...@@ -119,19 +119,28 @@ describe('DiscussionNotes', () => {
it('emits deleteNote when first note emits handleDeleteNote', () => { it('emits deleteNote when first note emits handleDeleteNote', () => {
findNoteAtIndex(0).vm.$emit('handleDeleteNote'); findNoteAtIndex(0).vm.$emit('handleDeleteNote');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().deleteNote).toBeTruthy(); expect(wrapper.emitted().deleteNote).toBeTruthy();
}); });
});
it('emits startReplying when first note emits startReplying', () => { it('emits startReplying when first note emits startReplying', () => {
findNoteAtIndex(0).vm.$emit('startReplying'); findNoteAtIndex(0).vm.$emit('startReplying');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().startReplying).toBeTruthy(); expect(wrapper.emitted().startReplying).toBeTruthy();
}); });
});
it('emits deleteNote when second note emits handleDeleteNote', () => { it('emits deleteNote when second note emits handleDeleteNote', () => {
findNoteAtIndex(1).vm.$emit('handleDeleteNote'); findNoteAtIndex(1).vm.$emit('handleDeleteNote');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().deleteNote).toBeTruthy(); expect(wrapper.emitted().deleteNote).toBeTruthy();
}); });
}); });
});
describe('with ungroupped notes', () => { describe('with ungroupped notes', () => {
let note; let note;
...@@ -142,10 +151,13 @@ describe('DiscussionNotes', () => { ...@@ -142,10 +151,13 @@ describe('DiscussionNotes', () => {
it('emits deleteNote when first note emits handleDeleteNote', () => { it('emits deleteNote when first note emits handleDeleteNote', () => {
note.vm.$emit('handleDeleteNote'); note.vm.$emit('handleDeleteNote');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().deleteNote).toBeTruthy(); expect(wrapper.emitted().deleteNote).toBeTruthy();
}); });
}); });
}); });
});
describe('componentData', () => { describe('componentData', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -118,9 +118,11 @@ describe('Repository last commit component', () => { ...@@ -118,9 +118,11 @@ describe('Repository last commit component', () => {
vm.find('.text-expander').vm.$emit('click'); vm.find('.text-expander').vm.$emit('click');
return vm.vm.$nextTick().then(() => {
expect(vm.find('.commit-row-description').isVisible()).toBe(true); expect(vm.find('.commit-row-description').isVisible()).toBe(true);
expect(vm.find('.text-expander').classes('open')).toBe(true); expect(vm.find('.text-expander').classes('open')).toBe(true);
}); });
});
it('renders the signature HTML as returned by the backend', () => { it('renders the signature HTML as returned by the backend', () => {
factory(createCommitData({ signatureHtml: '<button>Verified</button>' })); factory(createCommitData({ signatureHtml: '<button>Verified</button>' }));
......
...@@ -56,6 +56,8 @@ describe('Commits message dropdown component', () => { ...@@ -56,6 +56,8 @@ describe('Commits message dropdown component', () => {
it('should emit a commit title on selecting commit', () => { it('should emit a commit title on selecting commit', () => {
findFirstDropdownElement().vm.$emit('click'); findFirstDropdownElement().vm.$emit('click');
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.emitted().input[0]).toEqual(['Update test.txt']); expect(wrapper.emitted().input[0]).toEqual(['Update test.txt']);
}); });
});
}); });
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