2023-06-20 12:21:49 +00:00
|
|
|
import { v4 as uuid } from "uuid";
|
2021-08-20 09:13:47 +00:00
|
|
|
import LoginPage from "../support/pages/LoginPage";
|
2022-12-07 15:28:28 +00:00
|
|
|
import SidebarPage from "../support/pages/admin-ui/SidebarPage";
|
2022-05-19 13:43:48 +00:00
|
|
|
import UserEventsTab, {
|
|
|
|
UserEventSearchData,
|
2022-12-07 15:28:28 +00:00
|
|
|
} from "../support/pages/admin-ui/manage/events/tabs/UserEventsTab";
|
|
|
|
import AdminEventsTab from "../support/pages/admin-ui/manage/events/tabs/AdminEventsTab";
|
|
|
|
import RealmSettingsPage from "../support/pages/admin-ui/manage/realm_settings/RealmSettingsPage";
|
|
|
|
import Masthead from "../support/pages/admin-ui/Masthead";
|
2022-01-07 07:27:58 +00:00
|
|
|
import { keycloakBefore } from "../support/util/keycloak_hooks";
|
2022-05-19 13:43:48 +00:00
|
|
|
import EventsPage, {
|
|
|
|
EventsTab,
|
2022-12-07 15:28:28 +00:00
|
|
|
} from "../support/pages/admin-ui/manage/events/EventsPage";
|
|
|
|
import ListingPage from "../support/pages/admin-ui/ListingPage";
|
2022-05-19 13:43:48 +00:00
|
|
|
import adminClient from "../support/util/AdminClient";
|
2021-08-20 09:13:47 +00:00
|
|
|
|
|
|
|
const loginPage = new LoginPage();
|
|
|
|
const sidebarPage = new SidebarPage();
|
2021-09-03 10:50:45 +00:00
|
|
|
const userEventsTab = new UserEventsTab();
|
2022-05-19 13:43:48 +00:00
|
|
|
const eventsPage = new EventsPage();
|
2021-09-03 10:50:45 +00:00
|
|
|
const adminEventsTab = new AdminEventsTab();
|
2021-08-20 09:13:47 +00:00
|
|
|
const realmSettingsPage = new RealmSettingsPage();
|
|
|
|
const masthead = new Masthead();
|
2022-05-19 13:43:48 +00:00
|
|
|
const listingPage = new ListingPage();
|
|
|
|
|
|
|
|
const dateFrom = new Date();
|
|
|
|
dateFrom.setDate(dateFrom.getDate() - 100);
|
|
|
|
const dateFromFormatted = `${dateFrom.getFullYear()}-${dateFrom.getMonth()}-${dateFrom.getDay()}`;
|
|
|
|
const dateTo = new Date();
|
|
|
|
dateTo.setDate(dateTo.getDate() + 100);
|
|
|
|
const dateToFormatted = `${dateTo.getFullYear()}-${dateTo.getMonth()}-${dateTo.getDay()}`;
|
2021-08-20 09:13:47 +00:00
|
|
|
|
2023-03-20 12:38:10 +00:00
|
|
|
describe.skip("Events tests", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
const eventsTestUser = {
|
|
|
|
eventsTestUserId: "",
|
|
|
|
userRepresentation: {
|
2023-06-20 12:21:49 +00:00
|
|
|
username: "events-test" + uuid(),
|
2022-05-19 13:43:48 +00:00
|
|
|
enabled: true,
|
|
|
|
credentials: [{ value: "events-test" }],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
const eventsTestUserClientId = "admin-cli";
|
|
|
|
|
|
|
|
before(async () => {
|
|
|
|
const result = await adminClient.createUser(
|
2023-07-11 14:03:21 +00:00
|
|
|
eventsTestUser.userRepresentation,
|
2022-05-19 13:43:48 +00:00
|
|
|
);
|
2023-04-13 13:55:50 +00:00
|
|
|
eventsTestUser.eventsTestUserId = result.id!;
|
2022-05-19 13:43:48 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
after(() =>
|
2023-07-11 14:03:21 +00:00
|
|
|
adminClient.deleteUser(eventsTestUser.userRepresentation.username),
|
2022-05-19 13:43:48 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
describe("User events list", () => {
|
2021-09-15 09:45:56 +00:00
|
|
|
beforeEach(() => {
|
2021-08-20 09:13:47 +00:00
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2021-08-20 09:13:47 +00:00
|
|
|
sidebarPage.goToEvents();
|
|
|
|
});
|
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
it("Show empty when no save events", () => {
|
2021-09-15 09:45:56 +00:00
|
|
|
sidebarPage.goToRealmSettings();
|
2022-05-19 13:43:48 +00:00
|
|
|
realmSettingsPage
|
|
|
|
.goToEventsTab()
|
|
|
|
.goToUserEventsSettingsSubTab()
|
|
|
|
.enableSaveEventsSwitch()
|
|
|
|
.save()
|
|
|
|
.clearUserEvents();
|
2022-09-15 10:55:57 +00:00
|
|
|
|
|
|
|
cy.wait(5000);
|
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToUserEventsTab();
|
|
|
|
userEventsTab.assertNoSearchResultsExist(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Expand item to see more information", () => {
|
|
|
|
listingPage.expandRow(0).assertExpandedRowContainText(0, "code_id");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Search user events list", () => {
|
|
|
|
const eventTypes = [
|
|
|
|
"LOGOUT",
|
|
|
|
"CODE_TO_TOKEN",
|
|
|
|
"CODE_TO_TOKEN_ERROR",
|
|
|
|
"LOGIN_ERROR",
|
|
|
|
"LOGIN",
|
|
|
|
];
|
2021-09-15 09:45:56 +00:00
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2022-05-19 13:43:48 +00:00
|
|
|
sidebarPage.goToEvents();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check search dropdown display", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
2021-09-15 09:45:56 +00:00
|
|
|
realmSettingsPage
|
2022-05-19 13:43:48 +00:00
|
|
|
.goToEventsTab()
|
|
|
|
.goToUserEventsSettingsSubTab()
|
|
|
|
.disableSaveEventsSwitch()
|
|
|
|
.save();
|
2021-09-15 09:45:56 +00:00
|
|
|
|
2022-09-15 10:55:57 +00:00
|
|
|
cy.wait(5000);
|
|
|
|
|
2021-09-15 09:45:56 +00:00
|
|
|
masthead.signOut();
|
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
cy.visit("/");
|
2021-09-15 09:45:56 +00:00
|
|
|
|
|
|
|
sidebarPage.goToEvents();
|
2022-05-19 13:43:48 +00:00
|
|
|
eventsPage.tabUtils().checkIsCurrentTab(EventsTab.UserEvents);
|
|
|
|
userEventsTab.assertSearchUserEventDropdownMenuExist(true);
|
2021-08-20 09:13:47 +00:00
|
|
|
});
|
|
|
|
|
2021-09-03 10:50:45 +00:00
|
|
|
it("Check user events search form fields display", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
userEventsTab
|
|
|
|
.openSearchUserEventDropdownMenu()
|
|
|
|
.assertUserSearchDropdownMenuHasLabels();
|
2021-08-20 09:13:47 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check event type dropdown options exist", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
userEventsTab
|
|
|
|
.openSearchUserEventDropdownMenu()
|
|
|
|
.openEventTypeSelectMenu()
|
|
|
|
.clickEventTypeSelectItem(eventTypes[0])
|
|
|
|
.clickEventTypeSelectItem(eventTypes[1])
|
|
|
|
.clickEventTypeSelectItem(eventTypes[2])
|
|
|
|
.clickEventTypeSelectItem(eventTypes[3])
|
|
|
|
.closeEventTypeSelectMenu();
|
2021-08-20 09:13:47 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check `search events` button disabled by default", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
userEventsTab
|
|
|
|
.openSearchUserEventDropdownMenu()
|
|
|
|
.assertSearchEventBtnIsEnabled(false);
|
2021-08-20 09:13:47 +00:00
|
|
|
});
|
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
it("Check user events search and removal work", () => {
|
|
|
|
userEventsTab
|
|
|
|
.searchUserEventByEventType([eventTypes[0]])
|
|
|
|
.assertEventTypeChipGroupItemExist(eventTypes[0], true)
|
|
|
|
.assertEventTypeChipGroupItemExist(eventTypes[1], false)
|
|
|
|
.assertEventTypeChipGroupItemExist(eventTypes[2], false)
|
|
|
|
.assertEventTypeChipGroupItemExist(eventTypes[3], false)
|
|
|
|
.assertNoSearchResultsExist(true)
|
|
|
|
.removeEventTypeChipGroupItem(eventTypes[0])
|
|
|
|
.assertEventTypeChipGroupExist(false);
|
2021-09-03 10:50:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check for no events logged", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
userEventsTab
|
|
|
|
.searchUserEventByUserId("test")
|
|
|
|
.assertNoSearchResultsExist(true);
|
2021-08-20 09:13:47 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check `search events` button enabled", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
userEventsTab
|
|
|
|
.openSearchUserEventDropdownMenu()
|
|
|
|
.assertSearchEventBtnIsEnabled(false)
|
|
|
|
.typeUserId("11111")
|
|
|
|
.assertSearchEventBtnIsEnabled(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by user ID", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
realmSettingsPage
|
|
|
|
.goToEventsTab()
|
|
|
|
.goToUserEventsSettingsSubTab()
|
|
|
|
.enableSaveEventsSwitch()
|
|
|
|
.save();
|
|
|
|
sidebarPage.goToEvents();
|
|
|
|
cy.wrap(null).then(() =>
|
|
|
|
adminClient.loginUser(
|
|
|
|
eventsTestUser.userRepresentation.username,
|
|
|
|
eventsTestUser.userRepresentation.credentials[0].value,
|
2023-07-11 14:03:21 +00:00
|
|
|
eventsTestUserClientId,
|
|
|
|
),
|
2022-05-19 13:43:48 +00:00
|
|
|
);
|
|
|
|
userEventsTab
|
|
|
|
.searchUserEventByUserId(eventsTestUser.eventsTestUserId)
|
|
|
|
.assertUserIdChipGroupExist(true)
|
|
|
|
.assertEventTypeChipGroupExist(false)
|
|
|
|
.assertClientChipGroupExist(false)
|
|
|
|
.assertDateFromChipGroupExist(false)
|
|
|
|
.assertDateToChipGroupExist(false);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by event type", () => {
|
|
|
|
userEventsTab
|
|
|
|
.searchUserEventByEventType([eventTypes[4]])
|
|
|
|
.assertUserIdChipGroupExist(false)
|
|
|
|
.assertEventTypeChipGroupExist(true)
|
|
|
|
.assertClientChipGroupExist(false)
|
|
|
|
.assertDateFromChipGroupExist(false)
|
|
|
|
.assertDateToChipGroupExist(false);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by client", () => {
|
|
|
|
userEventsTab
|
|
|
|
.searchUserEventByClient(eventsTestUserClientId)
|
|
|
|
.assertUserIdChipGroupExist(false)
|
|
|
|
.assertEventTypeChipGroupExist(false)
|
|
|
|
.assertClientChipGroupExist(true)
|
|
|
|
.assertDateFromChipGroupExist(false)
|
|
|
|
.assertDateToChipGroupExist(false);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by date from", () => {
|
|
|
|
userEventsTab
|
|
|
|
.searchUserEventByDateFrom(dateFromFormatted)
|
|
|
|
.assertUserIdChipGroupExist(false)
|
|
|
|
.assertEventTypeChipGroupExist(false)
|
|
|
|
.assertClientChipGroupExist(false)
|
|
|
|
.assertDateFromChipGroupExist(true)
|
|
|
|
.assertDateToChipGroupExist(false);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by dato to", () => {
|
|
|
|
userEventsTab
|
|
|
|
.searchUserEventByDateTo(dateToFormatted)
|
|
|
|
.assertUserIdChipGroupExist(false)
|
|
|
|
.assertEventTypeChipGroupExist(false)
|
|
|
|
.assertClientChipGroupExist(false)
|
|
|
|
.assertDateFromChipGroupExist(false)
|
|
|
|
.assertDateToChipGroupExist(true);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
2023-04-06 11:33:15 +00:00
|
|
|
it("Search by Ip Adress to", () => {
|
|
|
|
userEventsTab
|
|
|
|
.assertIpAddressChipGroupExist(true)
|
|
|
|
.assertUserIdChipGroupExist(false)
|
|
|
|
.assertEventTypeChipGroupExist(false)
|
|
|
|
.assertClientChipGroupExist(false)
|
|
|
|
.assertDateFromChipGroupExist(false)
|
|
|
|
.assertDateToChipGroupExist(false);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
it("Search by all elements", () => {
|
|
|
|
const searchData = new UserEventSearchData();
|
|
|
|
searchData.client = eventsTestUserClientId;
|
|
|
|
searchData.userId = eventsTestUser.eventsTestUserId;
|
|
|
|
searchData.eventType = [eventTypes[4]];
|
|
|
|
searchData.dateFrom = dateFromFormatted;
|
|
|
|
searchData.dateTo = dateToFormatted;
|
|
|
|
userEventsTab
|
|
|
|
.searchUserEvent(searchData)
|
|
|
|
.assertUserIdChipGroupExist(true)
|
|
|
|
.assertEventTypeChipGroupExist(true)
|
|
|
|
.assertClientChipGroupExist(true)
|
|
|
|
.assertDateFromChipGroupExist(true)
|
|
|
|
.assertDateToChipGroupExist(true);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
2021-09-03 10:50:45 +00:00
|
|
|
});
|
2023-04-06 11:33:15 +00:00
|
|
|
|
|
|
|
it("Check `search user events` button enabled", () => {
|
|
|
|
userEventsTab
|
|
|
|
.openSearchUserEventDropdownMenu()
|
|
|
|
.typeIpAddress("11111")
|
|
|
|
.assertSearchEventBtnIsEnabled(true);
|
|
|
|
});
|
2021-09-03 10:50:45 +00:00
|
|
|
});
|
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
describe("Admin events list", () => {
|
2023-06-20 12:21:49 +00:00
|
|
|
const realmName = uuid();
|
2023-03-01 14:16:49 +00:00
|
|
|
|
|
|
|
before(() => adminClient.createRealm(realmName));
|
|
|
|
after(() => adminClient.deleteRealm(realmName));
|
|
|
|
|
2021-09-15 09:45:56 +00:00
|
|
|
beforeEach(() => {
|
2021-09-03 10:50:45 +00:00
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2023-03-01 14:16:49 +00:00
|
|
|
sidebarPage.goToRealm(realmName);
|
2021-09-03 10:50:45 +00:00
|
|
|
sidebarPage.goToEvents();
|
2022-05-19 13:43:48 +00:00
|
|
|
eventsPage.goToAdminEventsTab();
|
2021-09-03 10:50:45 +00:00
|
|
|
});
|
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
it("Show events", () => {
|
2021-09-03 10:50:45 +00:00
|
|
|
sidebarPage.goToRealmSettings();
|
2022-05-19 13:43:48 +00:00
|
|
|
realmSettingsPage
|
|
|
|
.goToEventsTab()
|
|
|
|
.goToAdminEventsSettingsSubTab()
|
|
|
|
.enableSaveEvents()
|
|
|
|
.save();
|
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
2021-09-03 10:50:45 +00:00
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
it("Show empty when no save events", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
2021-09-03 10:50:45 +00:00
|
|
|
realmSettingsPage
|
2022-05-19 13:43:48 +00:00
|
|
|
.goToEventsTab()
|
|
|
|
.goToAdminEventsSettingsSubTab()
|
|
|
|
.disableSaveEvents()
|
2023-01-26 09:31:07 +00:00
|
|
|
.save({ waitForRealm: false, waitForConfig: true })
|
2022-05-19 13:43:48 +00:00
|
|
|
.clearAdminEvents();
|
2022-09-15 10:55:57 +00:00
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
adminEventsTab.assertNoSearchResultsExist(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Search admin events list", () => {
|
|
|
|
const resourceTypes = ["REALM"];
|
|
|
|
const operationTypes = ["UPDATE"];
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2022-05-19 13:43:48 +00:00
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by resource types", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
realmSettingsPage
|
|
|
|
.goToEventsTab()
|
|
|
|
.goToAdminEventsSettingsSubTab()
|
|
|
|
.enableSaveEvents()
|
2023-01-26 09:31:07 +00:00
|
|
|
.save({ waitForRealm: false, waitForConfig: true });
|
2022-05-19 13:43:48 +00:00
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByResourceTypes([resourceTypes[0]])
|
|
|
|
.assertResourceTypesChipGroupExist(true);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by operation types", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByOperationTypes([operationTypes[0]])
|
|
|
|
.assertOperationTypesChipGroupExist(true);
|
|
|
|
listingPage.itemsGreaterThan(0);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by resource path", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByResourcePath("test")
|
|
|
|
.assertResourcePathChipGroupExist(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by realm", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByRealm("master")
|
|
|
|
.assertRealmChipGroupExist(true);
|
|
|
|
});
|
2021-09-03 10:50:45 +00:00
|
|
|
|
2022-05-19 13:43:48 +00:00
|
|
|
it("Search by client", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByClient("admin-cli")
|
|
|
|
.assertClientChipGroupExist(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by user ID", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByUser("test")
|
|
|
|
.assertUserChipGroupExist(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by IP address", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByIpAddress("test")
|
|
|
|
.assertIpAddressChipGroupExist(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by date from", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByDateTo(dateToFormatted)
|
|
|
|
.assertDateToChipGroupExist(true);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Search by date to", () => {
|
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByDateFrom(dateFromFormatted)
|
|
|
|
.assertDateFromChipGroupExist(true);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe("Search admin events", () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2022-05-19 13:43:48 +00:00
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check admin events search form fields display", () => {
|
|
|
|
sidebarPage.goToRealmSettings();
|
|
|
|
realmSettingsPage
|
|
|
|
.goToEventsTab()
|
|
|
|
.goToAdminEventsSettingsSubTab()
|
|
|
|
.disableSaveEvents()
|
2023-01-26 09:31:07 +00:00
|
|
|
.save({ waitForRealm: false, waitForConfig: true });
|
2021-09-15 09:45:56 +00:00
|
|
|
sidebarPage.goToEvents();
|
2022-05-19 13:43:48 +00:00
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
adminEventsTab
|
|
|
|
.openSearchAdminEventDropdownMenu()
|
|
|
|
.assertAdminSearchDropdownMenuHasLabels();
|
2021-09-15 09:45:56 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check `search admin events` button disabled by default", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
adminEventsTab
|
|
|
|
.openSearchAdminEventDropdownMenu()
|
|
|
|
.assertSearchAdminBtnEnabled(false);
|
2021-09-15 09:45:56 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check admin events search and removal work", () => {
|
2021-09-03 10:50:45 +00:00
|
|
|
sidebarPage.goToEvents();
|
2022-05-19 13:43:48 +00:00
|
|
|
eventsPage
|
|
|
|
.goToAdminEventsTab()
|
|
|
|
.searchAdminEventByResourcePath("events/config")
|
|
|
|
.assertResourcePathChipGroupItemExist("events/config", true)
|
|
|
|
.removeResourcePathChipGroup();
|
|
|
|
listingPage.itemContainValue("UPDATE", 3, "UPDATE");
|
2021-09-03 10:50:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check for no events logged", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
adminEventsTab
|
|
|
|
.searchAdminEventByResourcePath("events/test")
|
|
|
|
.assertNoSearchResultsExist(true);
|
2021-09-03 10:50:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check `search admin events` button enabled", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
adminEventsTab
|
|
|
|
.openSearchAdminEventDropdownMenu()
|
|
|
|
.typeIpAddress("11111")
|
|
|
|
.assertSearchAdminBtnEnabled(true);
|
2021-08-20 09:13:47 +00:00
|
|
|
});
|
|
|
|
});
|
2021-09-07 11:38:36 +00:00
|
|
|
|
2021-09-15 09:45:56 +00:00
|
|
|
describe("Check more button opens auth and representation dialogs", () => {
|
|
|
|
beforeEach(() => {
|
2021-09-07 11:38:36 +00:00
|
|
|
loginPage.logIn();
|
2023-02-10 10:10:35 +00:00
|
|
|
keycloakBefore();
|
2021-09-07 11:38:36 +00:00
|
|
|
sidebarPage.goToEvents();
|
2022-05-19 13:43:48 +00:00
|
|
|
eventsPage.goToAdminEventsTab();
|
2021-09-07 11:38:36 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check auth dialog opens and is not empty", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
listingPage.clickRowDetails("UPDATE").clickDetailMenu("Auth");
|
|
|
|
adminEventsTab.assertAuthDialogIsNotEmpty();
|
2021-09-07 11:38:36 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it("Check representation dialog opens and is not empty", () => {
|
2022-05-19 13:43:48 +00:00
|
|
|
listingPage.clickRowDetails("UPDATE").clickDetailMenu("Representation");
|
|
|
|
adminEventsTab.assertRepresentationDialogIsNotEmpty();
|
2021-09-07 11:38:36 +00:00
|
|
|
});
|
|
|
|
});
|
2023-03-22 16:14:53 +00:00
|
|
|
|
|
|
|
describe("Accessibility tests for events", () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
loginPage.logIn();
|
|
|
|
keycloakBefore();
|
|
|
|
sidebarPage.goToEvents();
|
|
|
|
cy.injectAxe();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check a11y violations on load/ user events tab", () => {
|
|
|
|
cy.checkA11y();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check a11y violations in user events search form", () => {
|
|
|
|
userEventsTab.openSearchUserEventDropdownMenu();
|
|
|
|
cy.checkA11y();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check a11y violations on admin events tab", () => {
|
|
|
|
eventsPage.goToAdminEventsTab;
|
|
|
|
cy.checkA11y();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check a11y violations in admin events search form", () => {
|
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
adminEventsTab.openSearchAdminEventDropdownMenu();
|
|
|
|
cy.checkA11y();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check a11y violations in Auth dialog", () => {
|
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
listingPage.clickRowDetails("CREATE").clickDetailMenu("Auth");
|
|
|
|
cy.checkA11y();
|
|
|
|
});
|
|
|
|
|
|
|
|
it("Check a11y violations in Representation dialog", () => {
|
|
|
|
sidebarPage.goToEvents();
|
|
|
|
eventsPage.goToAdminEventsTab();
|
|
|
|
listingPage.clickRowDetails("CREATE").clickDetailMenu("Representation");
|
|
|
|
cy.checkA11y();
|
|
|
|
});
|
|
|
|
});
|
2021-08-20 09:13:47 +00:00
|
|
|
});
|