Commit 5d219e52 authored by Florie Guibert's avatar Florie Guibert

Migrate epic sidebar participants to widget

Review feedback
parent 34ff5a78
......@@ -57,8 +57,8 @@ export default {
},
},
methods: {
expandSidebar() {
this.$emit('expandSidebar');
toggleSidebar() {
this.$emit('toggleSidebar');
},
},
};
......@@ -71,6 +71,6 @@ export default {
:number-of-less-participants="7"
:lazy="false"
class="block participants"
@toggleSidebar="expandSidebar"
@toggleSidebar="toggleSidebar"
/>
</template>
......@@ -254,7 +254,7 @@ export default {
:iid="String(iid)"
:full-path="fullPath"
:issuable-type="issuableType"
@expandSidebar="handleSidebarToggle"
@toggleSidebar="handleSidebarToggle"
/>
<sidebar-subscriptions-widget
:iid="String(iid)"
......
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({
......
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