refactor naming in reset password page model

This commit is contained in:
mahula 2023-03-02 10:52:24 +01:00
parent 84b031c967
commit 2ded17348a
2 changed files with 6 additions and 6 deletions

View File

@ -2,19 +2,19 @@
export class ResetPasswordPage {
// selectors
newPasswordBlock = '#new-password-input-field'
newPasswordRepeatBlock = '#repeat-new-password-input-field'
newPasswordInput = '#new-password-input-field'
newPasswordRepeatInput = '#repeat-new-password-input-field'
resetPasswordBtn = 'button[type=submit]'
resetPasswordMessageBlock = '[data-test="reset-password-message"]'
signinBtn = '.btn.test-message-button'
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
}
repeatNewPassword(password: string) {
cy.get(this.newPasswordRepeatBlock)
cy.get(this.newPasswordRepeatInput)
.find('input[type=password]')
.type(password)
return this

View File

@ -74,12 +74,12 @@ When('the user opens the password reset link in the browser', () => {
cy.task('getResetPasswordLink').then((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', () => {
cy.task('getActivationLink').then((activationLink) => {
cy.visit(activationLink)
})
cy.get(resetPasswordPage.newPasswordRepeatBlock).should('be.visible')
cy.get(resetPasswordPage.newPasswordInput).should('be.visible')
})