diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9564aa2f7..de171cc61 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -267,7 +267,7 @@ jobs: report_name: Coverage Webapp type: lcov result_path: ./coverage/lcov.info - min_coverage: 65 + min_coverage: 64 token: ${{ github.token }} ############################################################################## diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index 0e14841d1..1ef1777fe 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -138,6 +138,7 @@ describe('ContributionForm.vue', () => { categoryIds: [], id: null, image: null, + groupId: null, }, } postTitleInput = wrapper.find('.ds-input') @@ -260,6 +261,7 @@ describe('ContributionForm.vue', () => { content: propsData.contribution.content, categoryIds: [], id: propsData.contribution.id, + groupId: null, image: { sensitive: false, }, diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index 6eb1ebbbc..0428b2e23 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -99,6 +99,10 @@ export default { type: Object, default: () => ({}), }, + groupId: { + type: String, + default: () => null, + }, }, data() { const { title, content, image, categories } = this.contribution @@ -173,6 +177,7 @@ export default { categoryIds, id: this.contribution.id || null, image, + groupId: this.groupId, }, }) .then(({ data }) => { diff --git a/webapp/components/Group/GroupList.spec.js b/webapp/components/Group/GroupList.spec.js new file mode 100644 index 000000000..ca6909de7 --- /dev/null +++ b/webapp/components/Group/GroupList.spec.js @@ -0,0 +1,33 @@ +import { mount } from '@vue/test-utils' +import GroupList from './GroupList.vue' + +const localVue = global.localVue + +const propsData = { + groups: [], +} + +describe('GroupList', () => { + let wrapper + let mocks + + beforeEach(() => { + mocks = { + $t: jest.fn(), + } + }) + + describe('mount', () => { + const Wrapper = () => { + return mount(GroupList, { propsData, mocks, localVue }) + } + + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders', () => { + expect(wrapper.findAll('.group-list')).toHaveLength(1) + }) + }) +}) diff --git a/webapp/components/Group/GroupList.vue b/webapp/components/Group/GroupList.vue index 645f670d2..7618e5b57 100644 --- a/webapp/components/Group/GroupList.vue +++ b/webapp/components/Group/GroupList.vue @@ -1,5 +1,5 @@