ToolJet/cypress/support/utils/common.js
Ajith KV de1261238d
Cypress test for the manage groups page (#3241)
* Added cypress test for manage groups

* Updated common selectors and text files

* Updated common utils file

* Added data-cy attribute for elements

* Updated folder create label

* Updated common utils file
2022-06-21 18:08:49 +05:30

34 lines
No EOL
1.1 KiB
JavaScript

import { path } from "Texts/common";
import { usersSelector } from "Selectors/manageUsers";
import { profileSelector } from "Selectors/profile";
import { commonSelectors } from "Selectors/common";
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 );
};
export const navigateToManageGroups=()=>{
cy.get(commonSelectors.dropdown).invoke("show");
cy.contains("Manage Groups").click();
cy.url().should("include",path.manageGroups );
}
export const navigateToManageSSO=()=>{
cy.get(commonSelectors.dropdown).invoke("show");
cy.contains("Manage SSO").click();
cy.url().should("include",path.manageSSO );
};