Use new Root API to render Admin UI (#21102)

This commit is contained in:
Jon Koops 2023-07-25 18:56:44 +02:00 committed by GitHub
parent 8848dfed74
commit 4932494a9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

View file

@ -52,6 +52,10 @@ describe("Realm settings general tab tests", () => {
realmSettingsPage.disableRealm(); realmSettingsPage.disableRealm();
masthead.checkNotificationMessage("Realm successfully updated", true); masthead.checkNotificationMessage("Realm successfully updated", true);
// Sometimes it takes the Keycloak server a while to disable the realm, even though the notification message has been displayed.
// To prevent flaky tests, we wait a second before continuing.
cy.wait(1000);
// Re-enable realm // Re-enable realm
realmSettingsPage.toggleSwitch(`${realmName}-switch`); realmSettingsPage.toggleSwitch(`${realmName}-switch`);
masthead.checkNotificationMessage("Realm successfully updated"); masthead.checkNotificationMessage("Realm successfully updated");

View file

@ -63,7 +63,7 @@ export default class CredentialsPage {
} }
clickConfirmationBtn() { clickConfirmationBtn() {
cy.findByTestId(this.confirmationButton).dblclick(); cy.findByTestId(this.confirmationButton).click();
return this; return this;
} }

View file

@ -2,8 +2,7 @@ import "@patternfly/react-core/dist/styles/base.css";
import "@patternfly/patternfly/patternfly-addons.css"; import "@patternfly/patternfly/patternfly-addons.css";
import { StrictMode } from "react"; import { StrictMode } from "react";
// eslint-disable-next-line react/no-deprecated import { createRoot } from "react-dom/client";
import { render } from "react-dom";
import { createHashRouter, RouterProvider } from "react-router-dom"; import { createHashRouter, RouterProvider } from "react-router-dom";
import { i18n } from "./i18n/i18n"; import { i18n } from "./i18n/i18n";
@ -18,10 +17,10 @@ await i18n.init();
const router = createHashRouter([RootRoute]); const router = createHashRouter([RootRoute]);
const container = document.getElementById("app"); const container = document.getElementById("app");
const root = createRoot(container!);
render( root.render(
<StrictMode> <StrictMode>
<RouterProvider router={router} /> <RouterProvider router={router} />
</StrictMode>, </StrictMode>,
container,
); );