diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index 448eb57ab..82fb9ff2b 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -65,7 +65,8 @@ const email = { EMAIL_SMTP_PORT: process.env.EMAIL_SMTP_PORT || '587', EMAIL_LINK_VERIFICATION: process.env.EMAIL_LINK_VERIFICATION || 'http://localhost/checkEmail/{code}', - EMAIL_LINK_SETPASSWORD: process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/reset/{code}', + EMAIL_LINK_SETPASSWORD: + process.env.EMAIL_LINK_SETPASSWORD || 'http://localhost/reset-password/{code}', RESEND_TIME: isNaN(resendTime) ? 10 : resendTime, } diff --git a/frontend/jest.config.js b/frontend/jest.config.js index 5caae815c..2a52ec707 100644 --- a/frontend/jest.config.js +++ b/frontend/jest.config.js @@ -12,6 +12,7 @@ module.exports = { '\\.(css|less)$': 'identity-obj-proxy', '\\.(scss)$': '/src/assets/mocks/styleMock.js', '^@/(.*)$': '/src/$1', + '^@test/(.*)$': '/test/$1', }, transform: { '^.+\\.vue$': 'vue-jest', diff --git a/frontend/src/App.vue b/frontend/src/App.vue index b14f5c8a2..39e417404 100755 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -10,8 +10,8 @@ diff --git a/frontend/src/views/Pages/ResetPassword.spec.js b/frontend/src/pages/ResetPassword.spec.js similarity index 92% rename from frontend/src/views/Pages/ResetPassword.spec.js rename to frontend/src/pages/ResetPassword.spec.js index 5ee2742f2..814d97bcb 100644 --- a/frontend/src/views/Pages/ResetPassword.spec.js +++ b/frontend/src/pages/ResetPassword.spec.js @@ -2,9 +2,9 @@ import { mount, RouterLinkStub } from '@vue/test-utils' import ResetPassword from './ResetPassword' 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/UserSettings/UserPassword.spec.js const localVue = global.localVue @@ -78,7 +78,7 @@ describe('ResetPassword', () => { describe('Register header', () => { describe('from reset', () => { beforeEach(() => { - mocks.$route.path.mock = 'reset' + mocks.$route.path.mock = 'reset-password' wrapper = Wrapper() }) @@ -156,8 +156,8 @@ describe('ResetPassword', () => { expect(toastErrorSpy).toHaveBeenCalledWith('...Code is older than 10 minutes') }) - it('router pushes to /password/reset', () => { - expect(routerPushMock).toHaveBeenCalledWith('/password/reset') + it('router pushes to /forgot-password/resetPassword', () => { + expect(routerPushMock).toHaveBeenCalledWith('/forgot-password/resetPassword') }) }) @@ -204,9 +204,9 @@ describe('ResetPassword', () => { }) }) - describe('server response with success on /reset', () => { + describe('server response with success on /reset-password', () => { beforeEach(async () => { - mocks.$route.path.mock = 'reset' + mocks.$route.path.mock = 'reset-password' wrapper = Wrapper() apolloMutationMock.mockResolvedValue({ data: { @@ -219,8 +219,8 @@ describe('ResetPassword', () => { await flushPromises() }) - it('redirects to "/thx/reset"', () => { - expect(routerPushMock).toHaveBeenCalledWith('/thx/reset') + it('redirects to "/thx/resetPassword"', () => { + expect(routerPushMock).toHaveBeenCalledWith('/thx/resetPassword') }) }) }) diff --git a/frontend/src/views/Pages/ResetPassword.vue b/frontend/src/pages/ResetPassword.vue similarity index 91% rename from frontend/src/views/Pages/ResetPassword.vue rename to frontend/src/pages/ResetPassword.vue index e4adeda9f..830107a99 100644 --- a/frontend/src/views/Pages/ResetPassword.vue +++ b/frontend/src/pages/ResetPassword.vue @@ -44,8 +44,8 @@