2021-01-27 12:56:28 +00:00
|
|
|
export default class SidebarPage {
|
|
|
|
realmsDrpDwn: string;
|
|
|
|
realmsList: string;
|
|
|
|
createRealmBtn: string;
|
|
|
|
clientsBtn: string;
|
|
|
|
clientScopesBtn: string;
|
|
|
|
realmRolesBtn: string;
|
|
|
|
usersBtn: string;
|
|
|
|
groupsBtn: string;
|
|
|
|
sessionsBtn: string;
|
|
|
|
eventsBtn: string;
|
|
|
|
realmSettingsBtn: string;
|
|
|
|
authenticationBtn: string;
|
|
|
|
identityProvidersBtn: string;
|
|
|
|
userFederationBtn: string;
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
this.realmsDrpDwn = "#realm-select-toggle";
|
|
|
|
this.realmsList = "#realm-select ul";
|
|
|
|
this.createRealmBtn = "#realm-select li:last-child a";
|
|
|
|
|
|
|
|
this.clientsBtn = "#nav-item-clients";
|
|
|
|
this.clientScopesBtn = "#nav-item-client-scopes";
|
|
|
|
this.realmRolesBtn = "#nav-item-roles";
|
|
|
|
this.usersBtn = "#nav-item-users";
|
|
|
|
this.groupsBtn = "#nav-item-groups";
|
|
|
|
this.sessionsBtn = "#nav-item-sessions";
|
|
|
|
this.eventsBtn = "#nav-item-events";
|
|
|
|
|
|
|
|
this.realmSettingsBtn = "#nav-item-realm-settings";
|
|
|
|
this.authenticationBtn = "#nav-item-authentication";
|
|
|
|
this.identityProvidersBtn = "#nav-item-identity-providers";
|
|
|
|
this.userFederationBtn = "#nav-item-user-federation";
|
|
|
|
}
|
|
|
|
|
|
|
|
getCurrentRealm() {
|
|
|
|
return cy.get(this.realmsDrpDwn).invoke("text");
|
|
|
|
}
|
|
|
|
|
2021-01-28 09:07:12 +00:00
|
|
|
goToRealm(realmName: string) {
|
2021-01-27 12:56:28 +00:00
|
|
|
cy.get(this.realmsDrpDwn).click();
|
|
|
|
cy.get(this.realmsList).contains(realmName).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToCreateRealm() {
|
|
|
|
cy.get(this.realmsDrpDwn).click();
|
|
|
|
cy.get(this.createRealmBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToClients() {
|
|
|
|
cy.get(this.clientsBtn).click();
|
|
|
|
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
goToClientScopes() {
|
|
|
|
cy.get(this.clientScopesBtn).click();
|
|
|
|
|
|
|
|
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() {
|
|
|
|
cy.get(this.identityProvidersBtn).click();
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|