mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
refactor naming in reset password page model
This commit is contained in:
parent
84b031c967
commit
2ded17348a
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
export class ResetPasswordPage {
|
export class ResetPasswordPage {
|
||||||
// selectors
|
// selectors
|
||||||
newPasswordBlock = '#new-password-input-field'
|
newPasswordInput = '#new-password-input-field'
|
||||||
newPasswordRepeatBlock = '#repeat-new-password-input-field'
|
newPasswordRepeatInput = '#repeat-new-password-input-field'
|
||||||
resetPasswordBtn = 'button[type=submit]'
|
resetPasswordBtn = 'button[type=submit]'
|
||||||
resetPasswordMessageBlock = '[data-test="reset-password-message"]'
|
resetPasswordMessageBlock = '[data-test="reset-password-message"]'
|
||||||
signinBtn = '.btn.test-message-button'
|
signinBtn = '.btn.test-message-button'
|
||||||
|
|
||||||
enterNewPassword(password: string) {
|
enterNewPassword(password: string) {
|
||||||
cy.get(this.newPasswordBlock).find('input[type=password]').type(password)
|
cy.get(this.newPasswordInput).find('input[type=password]').type(password)
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
repeatNewPassword(password: string) {
|
repeatNewPassword(password: string) {
|
||||||
cy.get(this.newPasswordRepeatBlock)
|
cy.get(this.newPasswordRepeatInput)
|
||||||
.find('input[type=password]')
|
.find('input[type=password]')
|
||||||
.type(password)
|
.type(password)
|
||||||
return this
|
return this
|
||||||
|
|||||||
@ -74,12 +74,12 @@ When('the user opens the password reset link in the browser', () => {
|
|||||||
cy.task('getResetPasswordLink').then((passwordResetLink) => {
|
cy.task('getResetPasswordLink').then((passwordResetLink) => {
|
||||||
cy.visit(passwordResetLink)
|
cy.visit(passwordResetLink)
|
||||||
})
|
})
|
||||||
cy.get(resetPasswordPage.newPasswordRepeatBlock).should('be.visible')
|
cy.get(resetPasswordPage.newPasswordInput).should('be.visible')
|
||||||
})
|
})
|
||||||
|
|
||||||
When('the user opens the activation link in the browser', () => {
|
When('the user opens the activation link in the browser', () => {
|
||||||
cy.task('getActivationLink').then((activationLink) => {
|
cy.task('getActivationLink').then((activationLink) => {
|
||||||
cy.visit(activationLink)
|
cy.visit(activationLink)
|
||||||
})
|
})
|
||||||
cy.get(resetPasswordPage.newPasswordRepeatBlock).should('be.visible')
|
cy.get(resetPasswordPage.newPasswordInput).should('be.visible')
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user