From 07dbce59dc5677fd9ecee4dfc438fae5dc03ed47 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 7 Mar 2022 19:49:18 +0100 Subject: [PATCH] move UserProfile folder to components --- .../Inputs/InputPasswordConfirmation.spec.js | 2 +- .../UserCard.spec.js | 0 .../UserProfile => components}/UserCard.vue | 0 .../UserCard_CoinAnimation.spec.js | 0 .../UserCard_CoinAnimation.vue | 0 .../UserCard_FormUserData.spec.js | 0 .../UserCard_FormUserData.vue | 0 .../UserCard_FormUserMail.spec.js | 0 .../UserCard_FormUserMail.vue | 0 .../UserCard_FormUserPasswort.spec.js | 0 .../UserCard_FormUserPasswort.vue | 0 .../UserCard_FormUsername.spec.js.old | 0 .../UserCard_FormUsername.vue.old | 0 .../UserCard_Language.spec.js | 0 .../UserCard_Language.vue | 0 .../UserCard_Newsletter.spec.js | 0 .../UserCard_Newsletter.vue | 0 frontend/src/pages/Login.vue | 2 +- .../NotFoundPage.spec.js | 0 .../{components => pages}/NotFoundPage.vue | 0 frontend/src/pages/Profile.vue | 12 +++--- frontend/src/pages/Register.vue | 2 +- frontend/src/pages/RegisterCommunity.vue | 2 +- frontend/src/pages/ResetPassword.spec.js | 2 +- frontend/src/pages/SelectCommunity.vue | 2 +- frontend/src/pages/Transactions.vue | 2 +- frontend/src/routes/guards.test.js | 2 +- frontend/src/routes/router.test.js | 40 +++++++++---------- frontend/src/routes/routes.js | 2 +- 29 files changed, 35 insertions(+), 35 deletions(-) rename frontend/src/{pages/UserProfile => components}/UserCard.spec.js (100%) rename frontend/src/{pages/UserProfile => components}/UserCard.vue (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_CoinAnimation.spec.js (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_CoinAnimation.vue (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUserData.spec.js (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUserData.vue (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUserMail.spec.js (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUserMail.vue (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUserPasswort.spec.js (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUserPasswort.vue (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUsername.spec.js.old (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_FormUsername.vue.old (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_Language.spec.js (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_Language.vue (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_Newsletter.spec.js (100%) rename frontend/src/{pages/UserProfile => components}/UserCard_Newsletter.vue (100%) rename frontend/src/{components => pages}/NotFoundPage.spec.js (100%) rename frontend/src/{components => pages}/NotFoundPage.vue (100%) diff --git a/frontend/src/components/Inputs/InputPasswordConfirmation.spec.js b/frontend/src/components/Inputs/InputPasswordConfirmation.spec.js index 953d0b960..061398739 100644 --- a/frontend/src/components/Inputs/InputPasswordConfirmation.spec.js +++ b/frontend/src/components/Inputs/InputPasswordConfirmation.spec.js @@ -4,7 +4,7 @@ import InputPasswordConfirmation from './InputPasswordConfirmation' 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', () => { let wrapper diff --git a/frontend/src/pages/UserProfile/UserCard.spec.js b/frontend/src/components/UserCard.spec.js similarity index 100% rename from frontend/src/pages/UserProfile/UserCard.spec.js rename to frontend/src/components/UserCard.spec.js diff --git a/frontend/src/pages/UserProfile/UserCard.vue b/frontend/src/components/UserCard.vue similarity index 100% rename from frontend/src/pages/UserProfile/UserCard.vue rename to frontend/src/components/UserCard.vue diff --git a/frontend/src/pages/UserProfile/UserCard_CoinAnimation.spec.js b/frontend/src/components/UserCard_CoinAnimation.spec.js similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_CoinAnimation.spec.js rename to frontend/src/components/UserCard_CoinAnimation.spec.js diff --git a/frontend/src/pages/UserProfile/UserCard_CoinAnimation.vue b/frontend/src/components/UserCard_CoinAnimation.vue similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_CoinAnimation.vue rename to frontend/src/components/UserCard_CoinAnimation.vue diff --git a/frontend/src/pages/UserProfile/UserCard_FormUserData.spec.js b/frontend/src/components/UserCard_FormUserData.spec.js similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUserData.spec.js rename to frontend/src/components/UserCard_FormUserData.spec.js diff --git a/frontend/src/pages/UserProfile/UserCard_FormUserData.vue b/frontend/src/components/UserCard_FormUserData.vue similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUserData.vue rename to frontend/src/components/UserCard_FormUserData.vue diff --git a/frontend/src/pages/UserProfile/UserCard_FormUserMail.spec.js b/frontend/src/components/UserCard_FormUserMail.spec.js similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUserMail.spec.js rename to frontend/src/components/UserCard_FormUserMail.spec.js diff --git a/frontend/src/pages/UserProfile/UserCard_FormUserMail.vue b/frontend/src/components/UserCard_FormUserMail.vue similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUserMail.vue rename to frontend/src/components/UserCard_FormUserMail.vue diff --git a/frontend/src/pages/UserProfile/UserCard_FormUserPasswort.spec.js b/frontend/src/components/UserCard_FormUserPasswort.spec.js similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUserPasswort.spec.js rename to frontend/src/components/UserCard_FormUserPasswort.spec.js diff --git a/frontend/src/pages/UserProfile/UserCard_FormUserPasswort.vue b/frontend/src/components/UserCard_FormUserPasswort.vue similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUserPasswort.vue rename to frontend/src/components/UserCard_FormUserPasswort.vue diff --git a/frontend/src/pages/UserProfile/UserCard_FormUsername.spec.js.old b/frontend/src/components/UserCard_FormUsername.spec.js.old similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUsername.spec.js.old rename to frontend/src/components/UserCard_FormUsername.spec.js.old diff --git a/frontend/src/pages/UserProfile/UserCard_FormUsername.vue.old b/frontend/src/components/UserCard_FormUsername.vue.old similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_FormUsername.vue.old rename to frontend/src/components/UserCard_FormUsername.vue.old diff --git a/frontend/src/pages/UserProfile/UserCard_Language.spec.js b/frontend/src/components/UserCard_Language.spec.js similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_Language.spec.js rename to frontend/src/components/UserCard_Language.spec.js diff --git a/frontend/src/pages/UserProfile/UserCard_Language.vue b/frontend/src/components/UserCard_Language.vue similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_Language.vue rename to frontend/src/components/UserCard_Language.vue diff --git a/frontend/src/pages/UserProfile/UserCard_Newsletter.spec.js b/frontend/src/components/UserCard_Newsletter.spec.js similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_Newsletter.spec.js rename to frontend/src/components/UserCard_Newsletter.spec.js diff --git a/frontend/src/pages/UserProfile/UserCard_Newsletter.vue b/frontend/src/components/UserCard_Newsletter.vue similarity index 100% rename from frontend/src/pages/UserProfile/UserCard_Newsletter.vue rename to frontend/src/components/UserCard_Newsletter.vue diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 8a6d571af..57b97200d 100755 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -66,7 +66,7 @@ import { login } from '@/graphql/queries' import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo' export default { - name: 'login', + name: 'Login', components: { InputPassword, InputEmail, diff --git a/frontend/src/components/NotFoundPage.spec.js b/frontend/src/pages/NotFoundPage.spec.js similarity index 100% rename from frontend/src/components/NotFoundPage.spec.js rename to frontend/src/pages/NotFoundPage.spec.js diff --git a/frontend/src/components/NotFoundPage.vue b/frontend/src/pages/NotFoundPage.vue similarity index 100% rename from frontend/src/components/NotFoundPage.vue rename to frontend/src/pages/NotFoundPage.vue diff --git a/frontend/src/pages/Profile.vue b/frontend/src/pages/Profile.vue index e06511f78..e36b7b297 100644 --- a/frontend/src/pages/Profile.vue +++ b/frontend/src/pages/Profile.vue @@ -13,12 +13,12 @@ diff --git a/frontend/src/pages/ResetPassword.spec.js b/frontend/src/pages/ResetPassword.spec.js index 2230d13c8..04bd11f79 100644 --- a/frontend/src/pages/ResetPassword.spec.js +++ b/frontend/src/pages/ResetPassword.spec.js @@ -4,7 +4,7 @@ import flushPromises from 'flush-promises' 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 diff --git a/frontend/src/pages/SelectCommunity.vue b/frontend/src/pages/SelectCommunity.vue index 59650c168..0535e4fe7 100644 --- a/frontend/src/pages/SelectCommunity.vue +++ b/frontend/src/pages/SelectCommunity.vue @@ -52,7 +52,7 @@ import { communities } from '@/graphql/queries' import { getCommunityInfoMixin } from '@/mixins/getCommunityInfo' export default { - name: 'registerSelectCommunity', + name: 'SelectCommunity', data() { return { communities: [], diff --git a/frontend/src/pages/Transactions.vue b/frontend/src/pages/Transactions.vue index f67f23ca3..31094e454 100644 --- a/frontend/src/pages/Transactions.vue +++ b/frontend/src/pages/Transactions.vue @@ -30,7 +30,7 @@ import GddTransactionList from '@/components/GddTransactionList.vue' import GdtTransactionList from '@/components/GdtTransactionList.vue' export default { - name: 'UserProfileTransactionList', + name: 'Transactions', components: { GddTransactionList, GdtTransactionList, diff --git a/frontend/src/routes/guards.test.js b/frontend/src/routes/guards.test.js index d4d2869d4..6079a6136 100644 --- a/frontend/src/routes/guards.test.js +++ b/frontend/src/routes/guards.test.js @@ -41,7 +41,7 @@ describe('navigation guards', () => { }) 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() }) }) diff --git a/frontend/src/routes/router.test.js b/frontend/src/routes/router.test.js index 3810f8f4b..665848136 100644 --- a/frontend/src/routes/router.test.js +++ b/frontend/src/routes/router.test.js @@ -1,5 +1,5 @@ import router from './router' -import NotFound from '@/components/NotFoundPage.vue' +import NotFound from '@/pages/NotFoundPage.vue' describe('router', () => { describe('options', () => { @@ -58,7 +58,7 @@ describe('router', () => { 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() expect(component.default.name).toBe('Overview') }) @@ -69,7 +69,7 @@ describe('router', () => { 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() expect(component.default.name).toBe('Send') }) @@ -80,7 +80,7 @@ describe('router', () => { 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() expect(component.default.name).toBe('Profile') }) @@ -91,30 +91,30 @@ describe('router', () => { 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() - expect(component.default.name).toBe('UserProfileTransactionList') + expect(component.default.name).toBe('Transactions') }) }) describe('login', () => { - it('loads the "Login" component', async () => { + it('loads the "Login" page', async () => { const component = await routes.find((r) => r.path === '/login').component() - expect(component.default.name).toBe('login') + expect(component.default.name).toBe('Login') }) }) describe('register', () => { - it('loads the "register" component', async () => { + it('loads the "register" page', async () => { const component = await routes.find((r) => r.path === '/register').component() - expect(component.default.name).toBe('register') + expect(component.default.name).toBe('Register') }) }) describe('thx', () => { 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() expect(component.default.name).toBe('Thx') }) @@ -137,14 +137,14 @@ describe('router', () => { }) 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() expect(component.default.name).toBe('ForgotPassword') }) }) describe('password with param comingFrom', () => { - it('loads the "ForgotPassword" component', async () => { + it('loads the "ForgotPassword" page', async () => { const component = await routes .find((r) => r.path === '/forgot-password/:comingFrom') .component() @@ -153,21 +153,21 @@ describe('router', () => { }) 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() - expect(component.default.name).toBe('registerCommunity') + expect(component.default.name).toBe('RegisterCommunity') }) }) 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() - expect(component.default.name).toBe('registerSelectCommunity') + expect(component.default.name).toBe('SelectCommunity') }) }) describe('reset password', () => { - it('loads the "ResetPassword" component', async () => { + it('loads the "ResetPassword" page', async () => { const component = await routes .find((r) => r.path === '/reset-password/:optin') .component() @@ -176,14 +176,14 @@ describe('router', () => { }) 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() expect(component.default.name).toBe('ResetPassword') }) }) 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) }) }) diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index 3c138cfc9..0909ff531 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -1,4 +1,4 @@ -import NotFound from '@/components/NotFoundPage.vue' +import NotFound from '@/pages/NotFoundPage.vue' const routes = [ {