diff --git a/frontend/src/routes/router.test.js b/frontend/src/routes/router.test.js index 8b6fbf3b9..5e2e16005 100644 --- a/frontend/src/routes/router.test.js +++ b/frontend/src/routes/router.test.js @@ -131,6 +131,20 @@ describe('router', () => { }) }) + describe('register-community', () => { + it('loads the "registerCommunity" component', async () => { + const component = await routes.find((r) => r.path === '/register-community').component() + expect(component.default.name).toBe('registerCommunity') + }) + }) + + describe('select-community', () => { + it('loads the "registerSelectCommunity" component', async () => { + const component = await routes.find((r) => r.path === '/select-community').component() + expect(component.default.name).toBe('registerSelectCommunity') + }) + }) + describe('reset', () => { it('loads the "ResetPassword" component', async () => { const component = await routes.find((r) => r.path === '/reset/:optin').component() diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index 6bd1ac75d..71315da9e 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -36,7 +36,7 @@ const routes = [ path: '/thx/:comingFrom', component: () => import('../views/Pages/thx.vue'), beforeEnter: (to, from, next) => { - const validFrom = ['password', 'reset', 'register', 'community'] + const validFrom = ['password', 'reset', 'register'] if (!validFrom.includes(from.path.split('/')[1])) { next({ path: '/login' }) } else { diff --git a/frontend/src/views/Pages/Register.vue b/frontend/src/views/Pages/Register.vue index 43885e1c6..8e1a5d26d 100755 --- a/frontend/src/views/Pages/Register.vue +++ b/frontend/src/views/Pages/Register.vue @@ -124,10 +124,11 @@