From e3eaaf44351bcd071fcb3fdcb15cd3f521d84314 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 23 May 2023 11:04:01 +0200 Subject: [PATCH] fix tests for contribution form --- webapp/components/ContributionForm/ContributionForm.spec.js | 4 ++++ webapp/components/PostTeaser/PostTeaser.spec.js | 2 +- webapp/jest.config.js | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index ef3b47c37..6b9db448b 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -15,6 +15,7 @@ const stubs = { 'client-only': true, 'nuxt-link': true, 'v-popover': true, + 'date-picker': true, } describe('ContributionForm.vue', () => { @@ -45,6 +46,7 @@ describe('ContributionForm.vue', () => { slug: 'this-is-a-title-for-a-post', content: postContent, contentExcerpt: postContent, + postType: ['Article'], }, }, }), @@ -142,6 +144,7 @@ describe('ContributionForm.vue', () => { id: null, image: null, groupId: null, + postType: 'Article', }, } postTitleInput = wrapper.find('.ds-input') @@ -268,6 +271,7 @@ describe('ContributionForm.vue', () => { image: { sensitive: false, }, + postType: 'Article', }, } }) diff --git a/webapp/components/PostTeaser/PostTeaser.spec.js b/webapp/components/PostTeaser/PostTeaser.spec.js index 5ccad48bc..0d48729d3 100644 --- a/webapp/components/PostTeaser/PostTeaser.spec.js +++ b/webapp/components/PostTeaser/PostTeaser.spec.js @@ -28,7 +28,7 @@ describe('PostTeaser', () => { author: { id: 'u1', }, - postType: 'Article', + postType: ['Article'], }, } stubs = { diff --git a/webapp/jest.config.js b/webapp/jest.config.js index 6b0f5e461..b38b05ecd 100644 --- a/webapp/jest.config.js +++ b/webapp/jest.config.js @@ -29,8 +29,9 @@ module.exports = { modulePathIgnorePatterns: ['/dist/'], moduleNameMapper: { '\\.(svg)$': '/test/fileMock.js', - '\\.(css|less)$': 'identity-obj-proxy', + '\\.(scss|css|less)$': 'identity-obj-proxy', '@mapbox/mapbox-gl-geocoder': 'identity-obj-proxy', + 'vue2-datepicker/locale/undefined': 'vue2-datepicker/locale/en', '^@/(.*)$': '/src/$1', '^~/(.*)$': '/$1', },