mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix: DeleteDate vue and specs
This commit is contained in:
parent
bbf578ffc6
commit
b2f3b02422
@ -50,12 +50,20 @@ describe('DeleteData.vue', () => {
|
||||
})
|
||||
|
||||
describe('mount', () => {
|
||||
const data = () => {
|
||||
return {
|
||||
currentUserCounts: {
|
||||
contributionsCount: 4,
|
||||
commentedCount: 2,
|
||||
},
|
||||
}
|
||||
}
|
||||
const Wrapper = () => {
|
||||
const store = new Vuex.Store({
|
||||
getters,
|
||||
actions,
|
||||
})
|
||||
return mount(DeleteData, { mocks, localVue, store })
|
||||
return mount(DeleteData, { mocks, localVue, store, data })
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@ -11,8 +11,12 @@
|
||||
<p v-show="enableDeletionValue" class="notice">
|
||||
{{ $t('settings.deleteUserAccount.accountDescription') }}
|
||||
</p>
|
||||
<label v-if="currentUser.contributionsCount" class="checkbox">
|
||||
<input type="checkbox" v-model="deleteContributions" />
|
||||
<label v-if="currentUserCounts.contributionsCount" class="checkbox">
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="deleteContributions"
|
||||
data-test="contributions-deletion-checkbox"
|
||||
/>
|
||||
{{
|
||||
$t(
|
||||
'settings.deleteUserAccount.contributionsCount',
|
||||
|
||||
@ -9,7 +9,7 @@ localVue.use(DeleteUserModal)
|
||||
|
||||
const getters = {
|
||||
'auth/isAdmin': () => true,
|
||||
'auth/isModerator': () => false
|
||||
'auth/isModerator': () => false,
|
||||
}
|
||||
|
||||
describe('DeleteUserModal.vue', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user