diff --git a/client/cypress/integration/change-password-spec.js b/client/cypress/integration/change-password-spec.js index ff1f645e..e5b623dc 100644 --- a/client/cypress/integration/change-password-spec.js +++ b/client/cypress/integration/change-password-spec.js @@ -12,7 +12,7 @@ describe('Change Password Page', () => { it('shows an empty form', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.get('[data-cy=password-change-success]').should('not.exist'); cy.get('[data-cy=old-password]').should('have.value', ''); @@ -21,15 +21,15 @@ describe('Change Password Page', () => { it('shows errors if old password is not entered', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword('', validNewPassword); cy.get('[data-cy=old-password-local-errors]').should('contain', 'Dein aktuelles Passwort fehlt') }); - it('shows errors if old password is not entered', () => { + it('shows errors if new password is not entered', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword(validOldPassword, ''); cy.get('[data-cy=new-password-local-errors]').should('contain', 'Dein neues Passwort fehlt') @@ -37,7 +37,7 @@ describe('Change Password Page', () => { it('shows errors if new password is too short', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword(validOldPassword, 'Abc1!'); cy.get('[data-cy=new-password-local-errors]').should('contain', validationTooShort) @@ -45,7 +45,7 @@ describe('Change Password Page', () => { it('shows errors if new password has no uppercase letter', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword(validOldPassword, 'aabdddedddbc1!'); cy.get('[data-cy=new-password-local-errors]').should('contain', validationErrorMsg) @@ -53,7 +53,7 @@ describe('Change Password Page', () => { it('shows errors if new password has no lowercase letter', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword(validOldPassword, 'ABCDDD334551!'); cy.get('[data-cy=new-password-local-errors]').should('contain', validationErrorMsg) @@ -61,7 +61,7 @@ describe('Change Password Page', () => { it('shows errors if new password has no digit', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword(validOldPassword, 'AbcdEEDE!'); cy.get('[data-cy=new-password-local-errors]').should('contain', validationErrorMsg) @@ -69,7 +69,7 @@ describe('Change Password Page', () => { it('shows errors if new password has no special character', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword(validOldPassword, 'AbcdEEDE09877'); cy.get('[data-cy=new-password-local-errors]').should('contain', validationErrorMsg) @@ -77,7 +77,7 @@ describe('Change Password Page', () => { it('shows errors if old password does not match', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); cy.changePassword('test12345', validNewPassword); cy.get('[data-cy=old-password-remote-errors]').should('contain', validationOldWrongMsg) @@ -85,9 +85,9 @@ describe('Change Password Page', () => { it('shows success if change was successful', () => { cy.login('rahel.cueni', 'test'); - cy.visit('/password-change'); + cy.visit('/me/password-change'); - cy.changePassword('test', validNewPassword); + cy.changePassword(validOldPassword, validNewPassword); cy.get('[data-cy=password-change-success]').should('contain', 'Dein Password wurde erfolgreich geändert.'); cy.get('[data-cy=old-password]').should('have.value', ''); cy.get('[data-cy=new-password]').should('have.value', ''); diff --git a/client/src/components/PasswordChange.vue b/client/src/components/PasswordChange.vue index c7c737af..808e98a2 100644 --- a/client/src/components/PasswordChange.vue +++ b/client/src/components/PasswordChange.vue @@ -2,7 +2,7 @@