now only logs in per test suite for client tests (#1828)

This commit is contained in:
Erik Jan de Wit 2022-01-07 08:27:58 +01:00 committed by GitHub
parent f1c7e5ecb3
commit ced1008ad5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 62 additions and 42 deletions

View file

@ -1,4 +1,4 @@
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";

View file

@ -3,7 +3,7 @@ import Masthead from "../support/pages/admin_console/Masthead";
import ListingPage from "../support/pages/admin_console/ListingPage"; import ListingPage from "../support/pages/admin_console/ListingPage";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import CreateClientScopePage from "../support/pages/admin_console/manage/client_scopes/CreateClientScopePage"; import CreateClientScopePage from "../support/pages/admin_console/manage/client_scopes/CreateClientScopePage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import RoleMappingTab from "../support/pages/admin_console/manage/RoleMappingTab"; import RoleMappingTab from "../support/pages/admin_console/manage/RoleMappingTab";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";

View file

@ -4,7 +4,7 @@ import ListingPage from "../support/pages/admin_console/ListingPage";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import AuthenticationTab from "../support/pages/admin_console/manage/clients/Authentication"; import AuthenticationTab from "../support/pages/admin_console/manage/clients/Authentication";
const loginPage = new LoginPage(); const loginPage = new LoginPage();

View file

@ -7,7 +7,10 @@ import ModalUtils from "../support/util/ModalUtils";
import AdvancedTab from "../support/pages/admin_console/manage/clients/AdvancedTab"; import AdvancedTab from "../support/pages/admin_console/manage/clients/AdvancedTab";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
import InitialAccessTokenTab from "../support/pages/admin_console/manage/clients/InitialAccessTokenTab"; import InitialAccessTokenTab from "../support/pages/admin_console/manage/clients/InitialAccessTokenTab";
import { keycloakBefore } from "../support/util/keycloak_before"; import {
keycloakBefore,
keycloakBeforeEach,
} from "../support/util/keycloak_hooks";
import RoleMappingTab from "../support/pages/admin_console/manage/RoleMappingTab"; import RoleMappingTab from "../support/pages/admin_console/manage/RoleMappingTab";
import KeysTab from "../support/pages/admin_console/manage/clients/KeysTab"; import KeysTab from "../support/pages/admin_console/manage/clients/KeysTab";
import ClientScopesTab from "../support/pages/admin_console/manage/clients/ClientScopesTab"; import ClientScopesTab from "../support/pages/admin_console/manage/clients/ClientScopesTab";
@ -78,9 +81,13 @@ describe("Clients test", () => {
}); });
describe("Client creation", () => { describe("Client creation", () => {
beforeEach(() => { before(() => {
keycloakBefore(); keycloakBefore();
loginPage.logIn(); loginPage.logIn();
});
beforeEach(() => {
keycloakBeforeEach();
sidebarPage.goToClients(); sidebarPage.goToClients();
}); });
@ -155,9 +162,13 @@ describe("Clients test", () => {
const advancedTab = new AdvancedTab(); const advancedTab = new AdvancedTab();
let client: string; let client: string;
beforeEach(() => { before(() => {
keycloakBefore(); keycloakBefore();
loginPage.logIn(); loginPage.logIn();
});
beforeEach(() => {
keycloakBeforeEach();
sidebarPage.goToClients(); sidebarPage.goToClients();
client = "client_" + (Math.random() + 1).toString(36).substring(7); client = "client_" + (Math.random() + 1).toString(36).substring(7);
@ -205,13 +216,14 @@ describe("Clients test", () => {
const serviceAccountName = "service-account-client"; const serviceAccountName = "service-account-client";
beforeEach(() => { beforeEach(() => {
keycloakBefore(); keycloakBeforeEach();
loginPage.logIn();
sidebarPage.goToClients(); sidebarPage.goToClients();
}); });
before(async () => { before(() => {
await new AdminClient().createClient({ keycloakBefore();
loginPage.logIn();
new AdminClient().createClient({
protocol: "openid-connect", protocol: "openid-connect",
clientId: serviceAccountName, clientId: serviceAccountName,
publicClient: false, publicClient: false,
@ -234,7 +246,6 @@ describe("Clients test", () => {
.checkRoles(["manage-account", "offline_access", "uma_authorization"]); .checkRoles(["manage-account", "offline_access", "uma_authorization"]);
}); });
/* this test causes the test(s) that follow it to fail - it should be rewritten
it("assign", () => { it("assign", () => {
listingPage.goToItemDetails(serviceAccountName); listingPage.goToItemDetails(serviceAccountName);
serviceAccountTab serviceAccountTab
@ -244,7 +255,6 @@ describe("Clients test", () => {
.clickAssign(); .clickAssign();
masthead.checkNotificationMessage("Role mapping updated"); masthead.checkNotificationMessage("Role mapping updated");
}); });
*/
}); });
describe("Mapping tab", () => { describe("Mapping tab", () => {
@ -280,13 +290,14 @@ describe("Clients test", () => {
describe("Keys tab test", () => { describe("Keys tab test", () => {
const keysName = "keys-client"; const keysName = "keys-client";
beforeEach(() => { beforeEach(() => {
keycloakBefore(); keycloakBeforeEach();
loginPage.logIn();
sidebarPage.goToClients(); sidebarPage.goToClients();
listingPage.searchItem(keysName).goToItemDetails(keysName); listingPage.searchItem(keysName).goToItemDetails(keysName);
}); });
before(() => { before(() => {
keycloakBefore();
loginPage.logIn();
new AdminClient().createClient({ new AdminClient().createClient({
protocol: "openid-connect", protocol: "openid-connect",
clientId: keysName, clientId: keysName,
@ -319,13 +330,17 @@ describe("Clients test", () => {
describe("Realm client", () => { describe("Realm client", () => {
const clientName = "master-realm"; const clientName = "master-realm";
beforeEach(() => { before(() => {
keycloakBefore(); keycloakBefore();
loginPage.logIn(); loginPage.logIn();
sidebarPage.goToClients(); sidebarPage.goToClients();
listingPage.searchItem(clientName).goToItemDetails(clientName); listingPage.searchItem(clientName).goToItemDetails(clientName);
}); });
beforeEach(() => {
keycloakBeforeEach();
});
it("displays the correct tabs", () => { it("displays the correct tabs", () => {
cy.findByTestId("client-tabs") cy.findByTestId("client-tabs")
.find("#pf-tab-settings-settings") .find("#pf-tab-settings-settings")
@ -352,12 +367,18 @@ describe("Clients test", () => {
const clientId = "bearer-only"; const clientId = "bearer-only";
before(() => { before(() => {
keycloakBefore();
loginPage.logIn();
new AdminClient().createClient({ new AdminClient().createClient({
clientId, clientId,
protocol: "openid-connect", protocol: "openid-connect",
publicClient: false, publicClient: false,
bearerOnly: true, bearerOnly: true,
}); });
sidebarPage.goToClients();
cy.intercept("/auth/admin/realms/master/clients/*").as("fetchClient");
listingPage.searchItem(clientId).goToItemDetails(clientId);
cy.wait("@fetchClient");
}); });
after(() => { after(() => {
@ -365,12 +386,7 @@ describe("Clients test", () => {
}); });
beforeEach(() => { beforeEach(() => {
keycloakBefore(); keycloakBeforeEach();
loginPage.logIn();
sidebarPage.goToClients();
cy.intercept("/auth/admin/realms/master/clients/*").as("fetchClient");
listingPage.searchItem(clientId).goToItemDetails(clientId);
cy.wait("@fetchClient");
}); });
it("shows an explainer text for bearer only clients", () => { it("shows an explainer text for bearer only clients", () => {

View file

@ -4,7 +4,7 @@ import UserEventsTab from "../support/pages/admin_console/manage/events/UserEven
import AdminEventsTab from "../support/pages/admin_console/manage/events/AdminEventsTab"; import AdminEventsTab from "../support/pages/admin_console/manage/events/AdminEventsTab";
import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage"; import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const sidebarPage = new SidebarPage(); const sidebarPage = new SidebarPage();

View file

@ -9,7 +9,7 @@ import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import ViewHeaderPage from "../support/pages/ViewHeaderPage"; import ViewHeaderPage from "../support/pages/ViewHeaderPage";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
describe("Group test", () => { describe("Group test", () => {

View file

@ -1,7 +1,7 @@
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import ListingPage from "../support/pages/admin_console/ListingPage"; import ListingPage from "../support/pages/admin_console/ListingPage";
import CreateProviderPage from "../support/pages/admin_console/manage/identity_providers/CreateProviderPage"; import CreateProviderPage from "../support/pages/admin_console/manage/identity_providers/CreateProviderPage";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";

View file

@ -1,7 +1,7 @@
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import ListingPage from "../support/pages/admin_console/ListingPage"; import ListingPage from "../support/pages/admin_console/ListingPage";
import CreateProviderPage from "../support/pages/admin_console/manage/identity_providers/CreateProviderPage"; import CreateProviderPage from "../support/pages/admin_console/manage/identity_providers/CreateProviderPage";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";

View file

@ -1,7 +1,7 @@
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import ListingPage from "../support/pages/admin_console/ListingPage"; import ListingPage from "../support/pages/admin_console/ListingPage";
import CreateProviderPage from "../support/pages/admin_console/manage/identity_providers/CreateProviderPage"; import CreateProviderPage from "../support/pages/admin_console/manage/identity_providers/CreateProviderPage";

View file

@ -1,6 +1,6 @@
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const username = "admin"; const username = "admin";
const password = "admin"; const password = "admin";

View file

@ -2,7 +2,7 @@ import ListingPage from "../support/pages/admin_console/ListingPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const masthead = new Masthead(); const masthead = new Masthead();

View file

@ -3,7 +3,7 @@ import RealmSettings from "../support/pages/admin_console/configure/realm_settin
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
describe("Partial realm export", () => { describe("Partial realm export", () => {
const REALM_NAME = "partial-export-test-realm"; const REALM_NAME = "partial-export-test-realm";

View file

@ -3,7 +3,7 @@ import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import PartialImportModal from "../support/pages/admin_console/configure/realm_settings/PartialImportModal"; import PartialImportModal from "../support/pages/admin_console/configure/realm_settings/PartialImportModal";
import RealmSettings from "../support/pages/admin_console/configure/realm_settings/RealmSettings"; import RealmSettings from "../support/pages/admin_console/configure/realm_settings/RealmSettings";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
describe("Partial import test", () => { describe("Partial import test", () => {

View file

@ -5,7 +5,7 @@ import ListingPage from "../support/pages/admin_console/ListingPage";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import CreateRealmRolePage from "../support/pages/admin_console/manage/realm_roles/CreateRealmRolePage"; import CreateRealmRolePage from "../support/pages/admin_console/manage/realm_roles/CreateRealmRolePage";
import AssociatedRolesPage from "../support/pages/admin_console/manage/realm_roles/AssociatedRolesPage"; import AssociatedRolesPage from "../support/pages/admin_console/manage/realm_roles/AssociatedRolesPage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
let itemId = "realm_role_crud"; let itemId = "realm_role_crud";
const loginPage = new LoginPage(); const loginPage = new LoginPage();

View file

@ -1,7 +1,7 @@
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage"; import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
const loginPage = new LoginPage(); const loginPage = new LoginPage();

View file

@ -1,7 +1,7 @@
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage"; import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
const loginPage = new LoginPage(); const loginPage = new LoginPage();

View file

@ -3,7 +3,7 @@ import LoginPage from "../support/pages/LoginPage";
import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage"; import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import ListingPage from "../support/pages/admin_console/ListingPage"; import ListingPage from "../support/pages/admin_console/ListingPage";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";

View file

@ -2,7 +2,7 @@ import SidebarPage from "../support/pages/admin_console/SidebarPage";
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage"; import RealmSettingsPage from "../support/pages/admin_console/manage/realm_settings/RealmSettingsPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
const loginPage = new LoginPage(); const loginPage = new LoginPage();

View file

@ -3,7 +3,7 @@ import SidebarPage from "../support/pages/admin_console/SidebarPage";
import CreateRealmPage from "../support/pages/admin_console/CreateRealmPage"; import CreateRealmPage from "../support/pages/admin_console/CreateRealmPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const masthead = new Masthead(); const masthead = new Masthead();
const loginPage = new LoginPage(); const loginPage = new LoginPage();

View file

@ -1,7 +1,7 @@
import LoginPage from "../support/pages/LoginPage"; import LoginPage from "../support/pages/LoginPage";
import SidebarPage from "../support/pages/admin_console/SidebarPage"; import SidebarPage from "../support/pages/admin_console/SidebarPage";
import SessionsPage from "../support/pages/admin_console/manage/sessions/SessionsPage"; import SessionsPage from "../support/pages/admin_console/manage/sessions/SessionsPage";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const sidebarPage = new SidebarPage(); const sidebarPage = new SidebarPage();

View file

@ -3,7 +3,7 @@ import SidebarPage from "../support/pages/admin_console/SidebarPage";
import ProviderPage from "../support/pages/admin_console/manage/providers/ProviderPage"; import ProviderPage from "../support/pages/admin_console/manage/providers/ProviderPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const masthead = new Masthead(); const masthead = new Masthead();

View file

@ -6,7 +6,7 @@ import ProviderPage from "../support/pages/admin_console/manage/providers/Provid
import CreateClientPage from "../support/pages/admin_console/manage/clients/CreateClientPage"; import CreateClientPage from "../support/pages/admin_console/manage/clients/CreateClientPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const masthead = new Masthead(); const masthead = new Masthead();

View file

@ -4,7 +4,7 @@ import ListingPage from "../support/pages/admin_console/ListingPage";
import ProviderPage from "../support/pages/admin_console/manage/providers/ProviderPage"; import ProviderPage from "../support/pages/admin_console/manage/providers/ProviderPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const masthead = new Masthead(); const masthead = new Masthead();

View file

@ -3,7 +3,7 @@ import SidebarPage from "../support/pages/admin_console/SidebarPage";
import ProviderPage from "../support/pages/admin_console/manage/providers/ProviderPage"; import ProviderPage from "../support/pages/admin_console/manage/providers/ProviderPage";
import Masthead from "../support/pages/admin_console/Masthead"; import Masthead from "../support/pages/admin_console/Masthead";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
const loginPage = new LoginPage(); const loginPage = new LoginPage();
const masthead = new Masthead(); const masthead = new Masthead();

View file

@ -6,7 +6,7 @@ import ListingPage from "../support/pages/admin_console/ListingPage";
import UserDetailsPage from "../support/pages/admin_console/manage/users/UserDetailsPage"; import UserDetailsPage from "../support/pages/admin_console/manage/users/UserDetailsPage";
import AttributesTab from "../support/pages/admin_console/manage/AttributesTab"; import AttributesTab from "../support/pages/admin_console/manage/AttributesTab";
import ModalUtils from "../support/util/ModalUtils"; import ModalUtils from "../support/util/ModalUtils";
import { keycloakBefore } from "../support/util/keycloak_before"; import { keycloakBefore } from "../support/util/keycloak_hooks";
import GroupModal from "../support/pages/admin_console/manage/groups/GroupModal"; import GroupModal from "../support/pages/admin_console/manage/groups/GroupModal";
import UserGroupsPage from "../support/pages/admin_console/manage/users/UserGroupsPage"; import UserGroupsPage from "../support/pages/admin_console/manage/users/UserGroupsPage";
import AdminClient from "../support/util/AdminClient"; import AdminClient from "../support/util/AdminClient";

View file

@ -13,3 +13,7 @@ export const keycloakBefore = () => {
}); });
cy.visit(""); cy.visit("");
}; };
export const keycloakBeforeEach = () => {
Cypress.Cookies.preserveOnce("KEYCLOAK_SESSION", "KEYCLOAK_IDENTITY");
};