ToolJet/cypress/support/utils/common.js
Ajith KV cb678190d7
Cypress test for the profile settings page (#3083)
* Added cypress test for profile settings page

* Updated common selectors

* Updated common text

* Added functions for random names

* Added data-cy attributes for components

* Added verification for the input value

* Added password field validation

* Added common utils file

* Added wait

* Updated login error toast
2022-06-01 13:42:53 +05:30

14 lines
No EOL
430 B
JavaScript

import { path } from "Texts/common";
import { profileSelector } from "Selectors/profile";
export const navigateToProfile=()=>{
cy.get(profileSelector.profileDropdown).invoke("show");
cy.contains("Profile").click();
cy.url().should("include", path.profilePath);
};
export const logout=()=>{
cy.get(profileSelector.profileDropdown).invoke("show");
cy.contains("Logout").click();
cy.url().should("include",path.loginPath);
};