2021-07-14 10:14:03 +00:00
|
|
|
import LoginPage from "../support/pages/LoginPage";
|
|
|
|
import SidebarPage from "../support/pages/admin_console/SidebarPage";
|
|
|
|
import SessionsPage from "../support/pages/admin_console/manage/sessions/SessionsPage";
|
2022-01-07 07:27:58 +00:00
|
|
|
import { keycloakBefore } from "../support/util/keycloak_hooks";
|
2021-07-14 10:14:03 +00:00
|
|
|
|
|
|
|
const loginPage = new LoginPage();
|
|
|
|
const sidebarPage = new SidebarPage();
|
|
|
|
const sessionsPage = new SessionsPage();
|
|
|
|
|
2021-10-04 06:03:19 +00:00
|
|
|
describe("Sessions test", () => {
|
2022-02-22 13:30:18 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
keycloakBefore();
|
|
|
|
loginPage.logIn();
|
|
|
|
sidebarPage.goToSessions();
|
|
|
|
});
|
2021-08-16 19:25:36 +00:00
|
|
|
|
2022-02-22 13:30:18 +00:00
|
|
|
it("Set revocation notBefore", () => {
|
|
|
|
sessionsPage.setToNow();
|
|
|
|
});
|
2021-08-16 19:25:36 +00:00
|
|
|
|
2022-02-22 13:30:18 +00:00
|
|
|
it("Check if notBefore saved", () => {
|
|
|
|
sessionsPage.checkNotBeforeValueExists();
|
|
|
|
});
|
2021-08-16 19:25:36 +00:00
|
|
|
|
2022-02-22 13:30:18 +00:00
|
|
|
it("Clear revocation notBefore", () => {
|
|
|
|
sessionsPage.clearNotBefore();
|
|
|
|
});
|
2021-08-16 19:25:36 +00:00
|
|
|
|
2022-02-22 13:30:18 +00:00
|
|
|
it("Check if notBefore cleared", () => {
|
|
|
|
sessionsPage.checkNotBeforeCleared();
|
|
|
|
});
|
2021-08-16 19:25:36 +00:00
|
|
|
|
2022-02-22 13:30:18 +00:00
|
|
|
it("logout all sessions", () => {
|
|
|
|
sessionsPage.logoutAllSessions();
|
2021-08-16 19:25:36 +00:00
|
|
|
|
2022-02-22 13:30:18 +00:00
|
|
|
cy.get("#kc-page-title").contains("Sign in to your account");
|
2021-07-14 10:14:03 +00:00
|
|
|
});
|
|
|
|
});
|