2021-07-14 10:14:03 +00:00
|
|
|
export default class SessionsPage {
|
2021-08-16 19:25:36 +00:00
|
|
|
sessionTypeList = ".pf-c-select__toggle + ul";
|
|
|
|
allSessionTypesOption = "all-sessions-option";
|
|
|
|
regularSSOOption = "regular-sso-option";
|
|
|
|
offlineOption = "offline-option";
|
|
|
|
directGrantOption = "direct-grant-option";
|
|
|
|
serviceAccountOption = "service-account-option";
|
|
|
|
selectedType = ".pf-c-select__toggle-text";
|
|
|
|
revocationActionItem = "revocation";
|
|
|
|
setToNowButton = "set-to-now-button";
|
|
|
|
actionDropdown = "action-dropdown";
|
|
|
|
clearNotBeforeButton = "clear-not-before-button";
|
|
|
|
notBeforeInput = "not-before-input";
|
|
|
|
logoutAll = "logout-all";
|
2022-06-01 09:12:30 +00:00
|
|
|
logoutAllConfirm = "confirm";
|
2021-07-14 10:14:03 +00:00
|
|
|
|
2021-08-16 19:25:36 +00:00
|
|
|
setToNow() {
|
2021-10-26 12:41:08 +00:00
|
|
|
cy.findByTestId(this.actionDropdown).should("exist").click();
|
|
|
|
cy.findByTestId(this.revocationActionItem).should("exist").click();
|
|
|
|
cy.findByTestId(this.setToNowButton).should("exist").click();
|
2021-08-16 19:25:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
checkNotBeforeValueExists() {
|
2021-10-26 12:41:08 +00:00
|
|
|
cy.findByTestId(this.actionDropdown).should("exist").click();
|
|
|
|
cy.findByTestId(this.revocationActionItem).should("exist").click();
|
2021-09-17 13:23:34 +00:00
|
|
|
cy.findByTestId(this.notBeforeInput).should("not.have.value", "None");
|
2021-08-16 19:25:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
clearNotBefore() {
|
2021-10-26 12:41:08 +00:00
|
|
|
cy.findByTestId(this.actionDropdown).should("exist").click();
|
|
|
|
cy.findByTestId(this.revocationActionItem).should("exist").click();
|
|
|
|
cy.findByTestId(this.clearNotBeforeButton).should("exist").click();
|
2021-08-16 19:25:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
checkNotBeforeCleared() {
|
2021-10-26 12:41:08 +00:00
|
|
|
cy.findByTestId(this.actionDropdown).should("exist").click();
|
|
|
|
cy.findByTestId(this.revocationActionItem).should("exist").click();
|
2021-09-17 13:23:34 +00:00
|
|
|
cy.findByTestId(this.notBeforeInput).should("have.value", "None");
|
2021-08-16 19:25:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
logoutAllSessions() {
|
2021-10-26 12:41:08 +00:00
|
|
|
cy.findByTestId(this.actionDropdown).should("exist").click();
|
|
|
|
cy.findByTestId(this.logoutAll).should("exist").click();
|
|
|
|
cy.findByTestId(this.logoutAllConfirm).should("exist").click();
|
2021-07-14 10:14:03 +00:00
|
|
|
}
|
|
|
|
}
|