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
// 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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

@ -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,

View File

@ -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()
})
})

View File

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

View File

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