fix tests for contribution form

This commit is contained in:
Moriz Wahl 2023-05-23 11:04:01 +02:00
parent 59e7f8c0d2
commit e3eaaf4435
3 changed files with 7 additions and 2 deletions

View File

@ -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',
},
}
})

View File

@ -28,7 +28,7 @@ describe('PostTeaser', () => {
author: {
id: 'u1',
},
postType: 'Article',
postType: ['Article'],
},
}
stubs = {

View File

@ -29,8 +29,9 @@ module.exports = {
modulePathIgnorePatterns: ['<rootDir>/dist/'],
moduleNameMapper: {
'\\.(svg)$': '<rootDir>/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',
'^@/(.*)$': '<rootDir>/src/$1',
'^~/(.*)$': '<rootDir>/$1',
},