2022-06-01 08:12:53 +00:00
|
|
|
import { profileSelector } from "Selectors/profile";
|
|
|
|
|
import { profileText } from "Texts/profile";
|
|
|
|
|
|
2022-11-09 08:02:50 +00:00
|
|
|
export const profilePageElements = () => {
|
|
|
|
|
for (const elements in profileSelector.profileElements) {
|
|
|
|
|
cy.get(profileSelector.profileElements[elements]).verifyVisibleElement(
|
|
|
|
|
"have.text",
|
|
|
|
|
profileText.profileElements[elements]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
cy.get(profileSelector.updateButton).verifyVisibleElement(
|
|
|
|
|
"have.text",
|
|
|
|
|
profileText.updateButton
|
|
|
|
|
);
|
|
|
|
|
cy.get(profileSelector.changePasswordButton).verifyVisibleElement(
|
|
|
|
|
"have.text",
|
|
|
|
|
profileText.changePasswordButton
|
|
|
|
|
);
|
2024-01-23 12:34:59 +00:00
|
|
|
cy.get(profileSelector.userNameInput).verifyVisibleElement(
|
2022-11-09 08:02:50 +00:00
|
|
|
"have.value",
|
2024-01-23 12:34:59 +00:00
|
|
|
profileText.userName
|
2022-11-09 08:02:50 +00:00
|
|
|
);
|
2024-01-23 12:34:59 +00:00
|
|
|
|
2022-11-09 08:02:50 +00:00
|
|
|
cy.get(profileSelector.emailInput).verifyVisibleElement(
|
|
|
|
|
"have.value",
|
|
|
|
|
profileText.email
|
|
|
|
|
);
|
|
|
|
|
cy.get(profileSelector.currentPasswordField)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.should("be.visible");
|
|
|
|
|
cy.get(profileSelector.newPasswordField)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.should("be.visible");
|
2022-06-01 08:12:53 +00:00
|
|
|
};
|