diff --git a/backend/src/db/seed.js b/backend/src/db/seed.js index 242b3a856..dd8bb59cb 100644 --- a/backend/src/db/seed.js +++ b/backend/src/db/seed.js @@ -360,6 +360,33 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] }), ]) + // post into group + await Promise.all([ + mutate({ + mutation: createPostMutation(), + variables: { + id: 'p0-g0', + groupId: 'g0', + title: `What happend in Shanghai?`, + content: 'A sack of rise dropped in Shanghai. Should we further investigate?', + categoryIds: ['cat6'], + }, + }), + ]) + authenticatedUser = await bobDerBaumeister.toJson() + await Promise.all([ + mutate({ + mutation: createPostMutation(), + variables: { + id: 'p1-g0', + groupId: 'g0', + title: `The man on the moon`, + content: 'We have to further investigate about the stories of a man living on the moon.', + categoryIds: ['cat12', 'cat16'], + }, + }), + ]) + authenticatedUser = await jennyRostock.toJson() await Promise.all([ mutate({ @@ -439,6 +466,32 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] }, }), ]) + // post into group + await Promise.all([ + mutate({ + mutation: createPostMutation(), + variables: { + id: 'p0-g1', + groupId: 'g1', + title: `Can we use ocelot for education?`, + content: 'I like the concept of this school. Can we use our software in this?', + categoryIds: ['cat8'], + }, + }), + ]) + authenticatedUser = await peterLustig.toJson() + await Promise.all([ + mutate({ + mutation: createPostMutation(), + variables: { + id: 'p1-g1', + groupId: 'g1', + title: `Can we push this idea out of France?`, + content: 'This idea is too inportant to have the scope only on France.', + categoryIds: ['cat14'], + }, + }), + ]) authenticatedUser = await bobDerBaumeister.toJson() await Promise.all([ @@ -527,6 +580,20 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl'] }), ]) + authenticatedUser = await louie.toJson() + await Promise.all([ + mutate({ + mutation: createPostMutation(), + variables: { + id: 'p0-g2', + groupId: 'g2', + title: `I am a Noob`, + content: 'I am new to Yoga and did not join this group so far.', + categoryIds: ['cat4'], + }, + }), + ]) + // Create Posts const [p0, p1, p3, p4, p5, p6, p9, p10, p11, p13, p14, p15] = await Promise.all([ diff --git a/webapp/components/ContentMenu/ContentMenu.vue b/webapp/components/ContentMenu/ContentMenu.vue index 88d83d059..60bcccf43 100644 --- a/webapp/components/ContentMenu/ContentMenu.vue +++ b/webapp/components/ContentMenu/ContentMenu.vue @@ -7,7 +7,6 @@ icon="ellipsis-v" size="small" circle - ghost @click.prevent="toggleMenu()" /> diff --git a/webapp/components/Group/GroupContentMenu.spec.js b/webapp/components/ContentMenu/GroupContentMenu.spec.js similarity index 72% rename from webapp/components/Group/GroupContentMenu.spec.js rename to webapp/components/ContentMenu/GroupContentMenu.spec.js index 69c13e6f0..8b17b24b1 100644 --- a/webapp/components/Group/GroupContentMenu.spec.js +++ b/webapp/components/ContentMenu/GroupContentMenu.spec.js @@ -1,9 +1,12 @@ -import { mount } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import GroupContentMenu from './GroupContentMenu.vue' const localVue = global.localVue +config.stubs['router-link'] = '' + const propsData = { + usage: 'groupTeaser', resource: {}, group: {}, resourceType: 'group', @@ -29,7 +32,7 @@ describe('GroupContentMenu', () => { }) it('renders', () => { - expect(wrapper.findAll('.group-menu')).toHaveLength(1) + expect(wrapper.findAll('.group-content-menu')).toHaveLength(1) }) }) }) diff --git a/webapp/components/Group/GroupContentMenu.vue b/webapp/components/ContentMenu/GroupContentMenu.vue similarity index 81% rename from webapp/components/Group/GroupContentMenu.vue rename to webapp/components/ContentMenu/GroupContentMenu.vue index cfebe65a4..7a7737320 100644 --- a/webapp/components/Group/GroupContentMenu.vue +++ b/webapp/components/ContentMenu/GroupContentMenu.vue @@ -1,5 +1,5 @@