ToolJet/cypress/support/utils/common.js
Ajith KV c0232c816b
Cypress test for the manage users page (#3187)
* Added cypress test for manage users page

* Updated common text file

* Updated common utils file

* Added data-cy attributes for the elements

* Modified cypress test for manage users

* Added data-cy attributes for elements
2022-06-09 12:29:53 +05:30

21 lines
No EOL
663 B
JavaScript

import { path } from "Texts/common";
import { usersSelector } from "Selectors/manageUsers";
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);
};
export const navigateToManageUsers=()=>{
cy.get(usersSelector.dropdown).invoke("show");
cy.contains("Manage Users").click();
cy.url().should("include",path.manageUsers );
};