move UserProfile folder to components

This commit is contained in:
Moriz Wahl 2022-03-07 19:49:18 +01:00
parent 137408cda4
commit 07dbce59dc
29 changed files with 35 additions and 35 deletions

View File

@ -4,7 +4,7 @@ import InputPasswordConfirmation from './InputPasswordConfirmation'
const localVue = global.localVue const localVue = global.localVue
// validation is tested in src/views/Pages/UserProfile/UserCard_FormUserPasswort.spec.js // validation is tested in src/components/UserCard_FormUserPasswort.spec.js
describe('InputPasswordConfirmation', () => { describe('InputPasswordConfirmation', () => {
let wrapper let wrapper

View File

@ -66,7 +66,7 @@ import { login } from '@/graphql/queries'
import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo' import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo'
export default { export default {
name: 'login', name: 'Login',
components: { components: {
InputPassword, InputPassword,
InputEmail, InputEmail,

View File

@ -13,12 +13,12 @@
</div> </div>
</template> </template>
<script> <script>
import UserCard from './UserProfile/UserCard.vue' import UserCard from '@/components/UserCard.vue'
import FormUserData from './UserProfile/UserCard_FormUserData.vue' import FormUserData from '@/components/UserCard_FormUserData.vue'
import FormUserPasswort from './UserProfile/UserCard_FormUserPasswort.vue' import FormUserPasswort from '@/components/UserCard_FormUserPasswort.vue'
import FormUserLanguage from './UserProfile/UserCard_Language.vue' import FormUserLanguage from '@/components/UserCard_Language.vue'
import FormUserNewsletter from './UserProfile/UserCard_Newsletter.vue' import FormUserNewsletter from '@/components/UserCard_Newsletter.vue'
import FormUserCoinAnimation from './UserProfile/UserCard_CoinAnimation.vue' import FormUserCoinAnimation from '@/components/UserCard_CoinAnimation.vue'
export default { export default {
name: 'Profile', name: 'Profile',

View File

@ -195,7 +195,7 @@ import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo'
export default { export default {
components: { InputEmail, LanguageSwitchSelect }, components: { InputEmail, LanguageSwitchSelect },
name: 'register', name: 'Register',
mixins: [getCommunityInfoMixin], mixins: [getCommunityInfoMixin],
data() { data() {
return { return {

View File

@ -52,7 +52,7 @@
import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo' import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo'
export default { export default {
name: 'registerCommunity', name: 'RegisterCommunity',
mixins: [getCommunityInfoMixin], mixins: [getCommunityInfoMixin],
} }
</script> </script>

View File

@ -4,7 +4,7 @@ import flushPromises from 'flush-promises'
import { toastErrorSpy } from '@test/testSetup' import { toastErrorSpy } from '@test/testSetup'
// validation is tested in src/views/Pages/UserProfile/UserCard_FormUserPasswort.spec.js // validation is tested in src/components/UserCard_FormUserPasswort.spec.js
const localVue = global.localVue const localVue = global.localVue

View File

@ -52,7 +52,7 @@ import { communities } from '@/graphql/queries'
import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo' import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo'
export default { export default {
name: 'registerSelectCommunity', name: 'SelectCommunity',
data() { data() {
return { return {
communities: [], communities: [],

View File

@ -30,7 +30,7 @@ import GddTransactionList from '@/components/GddTransactionList.vue'
import GdtTransactionList from '@/components/GdtTransactionList.vue' import GdtTransactionList from '@/components/GdtTransactionList.vue'
export default { export default {
name: 'UserProfileTransactionList', name: 'Transactions',
components: { components: {
GddTransactionList, GddTransactionList,
GdtTransactionList, GdtTransactionList,

View File

@ -41,7 +41,7 @@ describe('navigation guards', () => {
}) })
it('does not commit the pid when not present', async () => { it('does not commit the pid when not present', async () => {
await router.push({ path: 'password' }) await router.push({ path: 'forgot-password' })
expect(storeCommitMock).not.toBeCalled() expect(storeCommitMock).not.toBeCalled()
}) })
}) })

View File

@ -1,5 +1,5 @@
import router from './router' import router from './router'
import NotFound from '@/components/NotFoundPage.vue' import NotFound from '@/pages/NotFoundPage.vue'
describe('router', () => { describe('router', () => {
describe('options', () => { describe('options', () => {
@ -58,7 +58,7 @@ describe('router', () => {
expect(routes.find((r) => r.path === '/overview').meta.requiresAuth).toBeTruthy() expect(routes.find((r) => r.path === '/overview').meta.requiresAuth).toBeTruthy()
}) })
it('loads the "Overview" component', async () => { it('loads the "Overview" page', async () => {
const component = await routes.find((r) => r.path === '/overview').component() const component = await routes.find((r) => r.path === '/overview').component()
expect(component.default.name).toBe('Overview') expect(component.default.name).toBe('Overview')
}) })
@ -69,7 +69,7 @@ describe('router', () => {
expect(routes.find((r) => r.path === '/send').meta.requiresAuth).toBeTruthy() expect(routes.find((r) => r.path === '/send').meta.requiresAuth).toBeTruthy()
}) })
it('loads the "Send" component', async () => { it('loads the "Send" page', async () => {
const component = await routes.find((r) => r.path === '/send').component() const component = await routes.find((r) => r.path === '/send').component()
expect(component.default.name).toBe('Send') expect(component.default.name).toBe('Send')
}) })
@ -80,7 +80,7 @@ describe('router', () => {
expect(routes.find((r) => r.path === '/profile').meta.requiresAuth).toBeTruthy() expect(routes.find((r) => r.path === '/profile').meta.requiresAuth).toBeTruthy()
}) })
it('loads the "UserProfile" component', async () => { it('loads the "Profile" page', async () => {
const component = await routes.find((r) => r.path === '/profile').component() const component = await routes.find((r) => r.path === '/profile').component()
expect(component.default.name).toBe('Profile') expect(component.default.name).toBe('Profile')
}) })
@ -91,30 +91,30 @@ describe('router', () => {
expect(routes.find((r) => r.path === '/transactions').meta.requiresAuth).toBeTruthy() expect(routes.find((r) => r.path === '/transactions').meta.requiresAuth).toBeTruthy()
}) })
it('loads the "UserProfileTransactionList" component', async () => { it('loads the "Transactions" page', async () => {
const component = await routes.find((r) => r.path === '/transactions').component() const component = await routes.find((r) => r.path === '/transactions').component()
expect(component.default.name).toBe('UserProfileTransactionList') expect(component.default.name).toBe('Transactions')
}) })
}) })
describe('login', () => { describe('login', () => {
it('loads the "Login" component', async () => { it('loads the "Login" page', async () => {
const component = await routes.find((r) => r.path === '/login').component() const component = await routes.find((r) => r.path === '/login').component()
expect(component.default.name).toBe('login') expect(component.default.name).toBe('Login')
}) })
}) })
describe('register', () => { describe('register', () => {
it('loads the "register" component', async () => { it('loads the "register" page', async () => {
const component = await routes.find((r) => r.path === '/register').component() const component = await routes.find((r) => r.path === '/register').component()
expect(component.default.name).toBe('register') expect(component.default.name).toBe('Register')
}) })
}) })
describe('thx', () => { describe('thx', () => {
const thx = routes.find((r) => r.path === '/thx/:comingFrom') const thx = routes.find((r) => r.path === '/thx/:comingFrom')
it('loads the "Thx" component', async () => { it('loads the "Thx" page', async () => {
const component = await thx.component() const component = await thx.component()
expect(component.default.name).toBe('Thx') expect(component.default.name).toBe('Thx')
}) })
@ -137,14 +137,14 @@ describe('router', () => {
}) })
describe('forgot password', () => { describe('forgot password', () => {
it('loads the "ForgotPassword" component', async () => { it('loads the "ForgotPassword" page', async () => {
const component = await routes.find((r) => r.path === '/forgot-password').component() const component = await routes.find((r) => r.path === '/forgot-password').component()
expect(component.default.name).toBe('ForgotPassword') expect(component.default.name).toBe('ForgotPassword')
}) })
}) })
describe('password with param comingFrom', () => { describe('password with param comingFrom', () => {
it('loads the "ForgotPassword" component', async () => { it('loads the "ForgotPassword" page', async () => {
const component = await routes const component = await routes
.find((r) => r.path === '/forgot-password/:comingFrom') .find((r) => r.path === '/forgot-password/:comingFrom')
.component() .component()
@ -153,21 +153,21 @@ describe('router', () => {
}) })
describe('register-community', () => { describe('register-community', () => {
it('loads the "registerCommunity" component', async () => { it('loads the "registerCommunity" page', async () => {
const component = await routes.find((r) => r.path === '/register-community').component() const component = await routes.find((r) => r.path === '/register-community').component()
expect(component.default.name).toBe('registerCommunity') expect(component.default.name).toBe('RegisterCommunity')
}) })
}) })
describe('select-community', () => { describe('select-community', () => {
it('loads the "registerSelectCommunity" component', async () => { it('loads the "SelectCommunity" page', async () => {
const component = await routes.find((r) => r.path === '/select-community').component() const component = await routes.find((r) => r.path === '/select-community').component()
expect(component.default.name).toBe('registerSelectCommunity') expect(component.default.name).toBe('SelectCommunity')
}) })
}) })
describe('reset password', () => { describe('reset password', () => {
it('loads the "ResetPassword" component', async () => { it('loads the "ResetPassword" page', async () => {
const component = await routes const component = await routes
.find((r) => r.path === '/reset-password/:optin') .find((r) => r.path === '/reset-password/:optin')
.component() .component()
@ -176,14 +176,14 @@ describe('router', () => {
}) })
describe('checkEmail', () => { describe('checkEmail', () => {
it('loads the "CheckEmail" component', async () => { it('loads the "CheckEmail" page', async () => {
const component = await routes.find((r) => r.path === '/checkEmail/:optin').component() const component = await routes.find((r) => r.path === '/checkEmail/:optin').component()
expect(component.default.name).toBe('ResetPassword') expect(component.default.name).toBe('ResetPassword')
}) })
}) })
describe('not found page', () => { describe('not found page', () => {
it('renders the "NotFound" component', async () => { it('renders the "NotFound" page', async () => {
expect(routes.find((r) => r.path === '*').component).toEqual(NotFound) expect(routes.find((r) => r.path === '*').component).toEqual(NotFound)
}) })
}) })

View File

@ -1,4 +1,4 @@
import NotFound from '@/components/NotFoundPage.vue' import NotFound from '@/pages/NotFoundPage.vue'
const routes = [ const routes = [
{ {