ToolJet/cypress-tests/cypress/support/utils/profile.js
Midhun Kumar E cf31de35fc
Upgrade Cypres to V10.3.1 (#3651)
* Remove cypress and its dependencies from root dir

* Install cypress to cypress-tests  directory

* Move cypress specs and utils

* Remove older files

* Fix package.json
2022-07-25 10:15:28 +05:30

16 lines
1 KiB
JavaScript

import { profileSelector } from "Selectors/profile";
import { profileText } from "Texts/profile";
export const profilePageElements = () =>{
for(const elements in profileSelector.profileElements ){
cy.get(profileSelector.profileElements[elements]).should("be.visible").and("have.text",profileText.profileElements[elements]);
}
cy.get(profileSelector.updateButton).should("be.visible").and("have.text", profileText.updateButton);
cy.get(profileSelector.changePasswordButton).should("be.visible").and("have.text", profileText.changePasswordButton);
cy.get(profileSelector.firstNameInput).should("be.visible").and("have.value", profileText.firstName);
cy.get(profileSelector.lastNameInput).should("be.visible").and("have.value", profileText.lastName);
cy.get(profileSelector.emailInput).should("be.visible").and("have.value", profileText.email);
cy.get(profileSelector.currentPasswordField).should("be.visible").should("be.visible");
cy.get(profileSelector.newPasswordField).should("be.visible").should("be.visible");
};