diff --git a/cypress/integration/realm_test.spec.ts b/cypress/integration/realm_test.spec.ts index 8a2e8d9034..16414db52c 100644 --- a/cypress/integration/realm_test.spec.ts +++ b/cypress/integration/realm_test.spec.ts @@ -3,7 +3,6 @@ import SidebarPage from "../support/pages/admin_console/SidebarPage"; import CreateRealmPage from "../support/pages/admin_console/CreateRealmPage"; import Masthead from "../support/pages/admin_console/Masthead"; import AdminClient from "../support/util/AdminClient"; -import RealmSelector from "../support/pages/admin_console/RealmSelector"; import { keycloakBefore, keycloakBeforeEach, @@ -13,7 +12,6 @@ const masthead = new Masthead(); const loginPage = new LoginPage(); const sidebarPage = new SidebarPage(); const createRealmPage = new CreateRealmPage(); -const realmSelector = new RealmSelector(); const adminClient = new AdminClient(); describe("Realms test", () => { @@ -78,23 +76,4 @@ describe("Realms test", () => { .should("eq", testRealmName); }); }); - - describe("More then 5 realms", () => { - const realmNames = ["One", "Two", "Three", "Four", "Five"]; - before(() => { - keycloakBefore(); - loginPage.logIn(); - realmNames.map((realm) => adminClient.createRealm(realm)); - }); - - after(() => { - for (const realmName of realmNames) { - adminClient.deleteRealm(realmName); - } - }); - - it("switch to searchable realm selector", () => { - realmSelector.openRealmContextSelector().shouldContainAll(realmNames); - }); - }); }); diff --git a/cypress/support/pages/admin_console/RealmSelector.ts b/cypress/support/pages/admin_console/RealmSelector.ts deleted file mode 100644 index d331462db7..0000000000 --- a/cypress/support/pages/admin_console/RealmSelector.ts +++ /dev/null @@ -1,27 +0,0 @@ -const expect = chai.expect; - -export default class RealmSelector { - private realmSelector = "realmSelector"; - private realmContextSelector = ".keycloak__realm_selector__context_selector"; - - shouldContainAll(realmsList: string[]) { - cy.findByTestId(this.realmSelector) - .scrollIntoView() - .get("ul") - .should((realms) => { - for (let index = 0; index < realmsList.length; index++) { - const realmName = realmsList[index]; - expect(realms).to.contain(realmName); - } - }); - - return this; - } - - openRealmContextSelector() { - cy.findByTestId(this.realmSelector).scrollIntoView(); - cy.get(this.realmContextSelector).click(); - - return this; - } -}