mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Tests pass
This commit is contained in:
parent
3fad432858
commit
e6af5a11ab
@ -1,4 +1,4 @@
|
|||||||
import { config, mount, createLocalVue } from '@vue/test-utils'
|
import { config, mount, createLocalVue, RouterLinkStub } from '@vue/test-utils'
|
||||||
import User from './User.vue'
|
import User from './User.vue'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
@ -30,7 +30,9 @@ describe('User.vue', () => {
|
|||||||
mocks = {
|
mocks = {
|
||||||
$t: jest.fn()
|
$t: jest.fn()
|
||||||
}
|
}
|
||||||
stubs = ['router-link', 'router-view']
|
stubs = {
|
||||||
|
NuxtLink: RouterLinkStub
|
||||||
|
}
|
||||||
getters = {
|
getters = {
|
||||||
'auth/user': () => {
|
'auth/user': () => {
|
||||||
return {}
|
return {}
|
||||||
@ -71,7 +73,6 @@ describe('User.vue', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
propsData.user.disabled = true
|
propsData.user.disabled = true
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div v-if="!user">
|
||||||
|
<div style="display: inline-block; float: left; margin-right: 4px; height: 100%; vertical-align: middle;">
|
||||||
|
<ds-avatar
|
||||||
|
style="display: inline-block; vertical-align: middle;"
|
||||||
|
size="32px"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div style="display: inline-block; height: 100%; vertical-align: middle;">
|
||||||
|
<b
|
||||||
|
class="username"
|
||||||
|
style="vertical-align: middle;"
|
||||||
|
>
|
||||||
|
Anonymus
|
||||||
|
</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<dropdown
|
<dropdown
|
||||||
|
v-else
|
||||||
:disabled="disabled || !showUserPopover"
|
:disabled="disabled || !showUserPopover"
|
||||||
placement="top-start"
|
placement="top-start"
|
||||||
offset="0"
|
offset="0"
|
||||||
@ -87,11 +104,6 @@
|
|||||||
</ds-space>
|
</ds-space>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
</ds-flex>
|
</ds-flex>
|
||||||
<!--<ds-text
|
|
||||||
color="soft"
|
|
||||||
size="small">
|
|
||||||
<ds-icon name="map-marker" /> Hamburg, Deutschland
|
|
||||||
</ds-text>-->
|
|
||||||
<ds-flex
|
<ds-flex
|
||||||
v-if="!itsMe"
|
v-if="!itsMe"
|
||||||
gutter="x-small"
|
gutter="x-small"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user