summaryrefslogtreecommitdiff
path: root/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js')
-rw-r--r--spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js b/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js
index 57b9a10b23e..859e63b3df6 100644
--- a/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js
+++ b/spec/frontend/sidebar/components/participants/sidebar_participants_widget_spec.js
@@ -1,5 +1,5 @@
import { shallowMount } from '@vue/test-utils';
-import Vue from 'vue';
+import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
@@ -45,6 +45,14 @@ describe('Sidebar Participants Widget', () => {
expect(findParticipants().props('loading')).toBe(true);
});
+ it('emits toggleSidebar event when participants child component emits toggleSidebar', async () => {
+ createComponent();
+ findParticipants().vm.$emit('toggleSidebar');
+
+ await nextTick();
+ expect(wrapper.emitted('toggleSidebar')).toEqual([[]]);
+ });
+
describe('when participants are loaded', () => {
beforeEach(() => {
createComponent({