2021-01-27 12:56:28 +00:00
|
|
|
export default class SidebarPage {
|
2021-05-03 16:44:47 +00:00
|
|
|
private realmsDrpDwn = "realmSelectorToggle";
|
|
|
|
private realmsList = "realmSelector";
|
|
|
|
private createRealmBtn = "add-realm";
|
|
|
|
|
|
|
|
private clientsBtn = "#nav-item-clients";
|
|
|
|
private clientScopesBtn = "#nav-item-client-scopes";
|
|
|
|
private realmRolesBtn = "#nav-item-roles";
|
|
|
|
private usersBtn = "#nav-item-users";
|
|
|
|
private groupsBtn = "#nav-item-groups";
|
|
|
|
private sessionsBtn = "#nav-item-sessions";
|
|
|
|
private eventsBtn = "#nav-item-events";
|
|
|
|
|
|
|
|
private realmSettingsBtn = "#nav-item-realm-settings";
|
|
|
|
private authenticationBtn = "#nav-item-authentication";
|
|
|
|
private identityProvidersBtn = "#nav-item-identity-providers";
|
|
|
|
private userFederationBtn = "#nav-item-user-federation";
|
2021-01-27 12:56:28 +00:00
|
|
|
|
|
|
|
getCurrentRealm() {
|
2021-05-03 16:44:47 +00:00
|
|
|
return cy.getId(this.realmsDrpDwn).scrollIntoView().invoke("text");
|
2021-01-27 12:56:28 +00:00
|
|
|
}
|
|
|
|
|
2021-01-28 09:07:12 +00:00
|
|
|
goToRealm(realmName: string) {
|
2021-05-03 16:44:47 +00:00
|
|
|
cy.getId(this.realmsDrpDwn).scrollIntoView().click();
|
|
|
|
cy.getId(this.realmsList).get("ul").contains(realmName).click();
|
2021-01-27 12:56:28 +00:00
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToCreateRealm() {
|
2021-05-06 05:31:40 +00:00
|
|
|
cy.getId(this.realmsDrpDwn).scrollIntoView();
|
|
|
|
cy.getId(this.realmsDrpDwn).click();
|
2021-05-03 16:44:47 +00:00
|
|
|
cy.getId(this.createRealmBtn).click();
|
2021-01-27 12:56:28 +00:00
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToClients() {
|
2021-05-03 16:44:47 +00:00
|
|
|
cy.get(this.clientsBtn).scrollIntoView().click();
|
2021-01-27 12:56:28 +00:00
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToClientScopes() {
|
2021-05-03 16:44:47 +00:00
|
|
|
cy.get(this.clientScopesBtn).scrollIntoView().click();
|
2021-01-27 12:56:28 +00:00
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToRealmRoles() {
|
|
|
|
cy.get(this.realmRolesBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToUsers() {
|
|
|
|
cy.get(this.usersBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToGroups() {
|
|
|
|
cy.get(this.groupsBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToSessions() {
|
|
|
|
cy.get(this.sessionsBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToEvents() {
|
|
|
|
cy.get(this.eventsBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToRealmSettings() {
|
|
|
|
cy.get(this.realmSettingsBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToAuthentication() {
|
|
|
|
cy.get(this.authenticationBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToIdentityProviders() {
|
2021-05-07 18:42:59 +00:00
|
|
|
cy.get(this.identityProvidersBtn).click();
|
2021-01-27 12:56:28 +00:00
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToUserFederation() {
|
|
|
|
cy.get(this.userFederationBtn).click();
|
2021-03-05 16:36:49 +00:00
|
|
|
cy.wait(1000);
|
2021-01-27 12:56:28 +00:00
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
2021-09-15 09:45:56 +00:00
|
|
|
|
|
|
|
waitForPageLoad() {
|
|
|
|
cy.get(".pf-c-spinner__tail-ball").should("not.exist");
|
|
|
|
return this;
|
|
|
|
}
|
2021-01-27 12:56:28 +00:00
|
|
|
}
|