fix language dependency of some selectors in login and user profile tests

This commit is contained in:
mahula 2022-09-28 10:38:46 +02:00
parent bb7e8d2b3d
commit 480378a182
3 changed files with 7 additions and 6 deletions

View File

@ -2,8 +2,8 @@
export class LoginPage { export class LoginPage {
// selectors // selectors
emailInput = "#Email-input-field"; emailInput = "input[type=email]";
passwordInput = "#Password-input-field"; passwordInput = "input[type=password]";
submitBtn = "[type=submit]"; submitBtn = "[type=submit]";
emailHint = "#vee_Email"; emailHint = "#vee_Email";
passwordHint = "#vee_Password"; passwordHint = "#vee_Password";

View File

@ -4,8 +4,8 @@ export class ProfilePage {
// selectors // selectors
openChangePassword = "[data-test=open-password-change-form]"; openChangePassword = "[data-test=open-password-change-form]";
oldPasswordInput = "#password-input-field"; oldPasswordInput = "#password-input-field";
newPasswordInput = "#New-password-input-field"; newPasswordInput = "#new-password-input-field";
newPasswordRepeatInput = "#Repeat-new-password-input-field"; newPasswordRepeatInput = "#repeat-new-password-input-field";
submitNewPasswordBtn = "[data-test=submit-new-password-btn]"; submitNewPasswordBtn = "[data-test=submit-new-password-btn]";
goto() { goto() {
@ -19,12 +19,12 @@ export class ProfilePage {
} }
enterNewPassword(password: string) { enterNewPassword(password: string) {
cy.get(this.newPasswordInput).clear().type(password); cy.get(this.newPasswordInput).find("input").clear().type(password);
return this; return this;
} }
enterRepeatPassword(password: string) { enterRepeatPassword(password: string) {
cy.get(this.newPasswordRepeatInput).clear().type(password); cy.get(this.newPasswordRepeatInput).find("input").clear().type(password);
return this; return this;
} }

View File

@ -29,6 +29,7 @@
required: true, required: true,
samePassword: value.password, samePassword: value.password,
}" }"
id="repeat-new-password-input-field"
:label="register ? $t('form.passwordRepeat') : $t('form.password_new_repeat')" :label="register ? $t('form.passwordRepeat') : $t('form.password_new_repeat')"
:immediate="true" :immediate="true"
:name="createId(register ? $t('form.passwordRepeat') : $t('form.password_new_repeat'))" :name="createId(register ? $t('form.passwordRepeat') : $t('form.password_new_repeat'))"