keycloak/js/apps/admin-ui/CONTRIBUTING.md
Erik Jan de Wit 095a194ec3
playwright rewrite (#36276)
* initial version playwright rewrite

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* small refactor cancel button

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added policies ciba to playwright

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added policies spec

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added flow tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added axe tests for flows

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added more tests for authentication flows

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added client advanced test to playwright

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added client authorization tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added axe check

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added test for initial access token

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added registration policies test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added client scope test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added client scope tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* updated dependency

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added client role test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fix running playwright tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added client saml

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added saml test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added events test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* more groups tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added group role test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added realm settings i18n tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added oidc and saml test for identity provider

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fix tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* update ci to run playwright instead of cypress

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* add masthead test and use component instead

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added organizations test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added export realm test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added partial import

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added realm roles

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* add realm client policies test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added client profile tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* merge errors

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* realm settings

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added realm settings general test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* add login tab and localization

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* realm settings accessibility test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added user profile test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added realm create test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added realm user registration spec

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added sessions test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added kerberos test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added ldap mapper test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added ldap test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* removed cypress tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added user tab test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* run playwright tests instead of jest tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed some tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed some more tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fix test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed tests

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fix test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* removed cypress

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* remove cyperss

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Remove some more workflow remanants from Cypress

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* lock file

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* pr review

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

---------

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Jon Koops <jonkoops@gmail.com>
Co-authored-by: Jon Koops <jonkoops@gmail.com>
2025-03-12 07:35:22 -04:00

2.8 KiB

Keycloak Admin UI

This project is the next generation of the Keycloak Administration UI. It is written with React and PatternFly 4 and uses Vite and Playwright.

Development

Prerequisites

Make sure that you have Node.js version 18 (or later) installed on your system. If you do not have Node.js installed we recommend using Node Version Manager to install it.

You can find out which version of Node.js you are using by running the following command:

node --version

In order to run the Keycloak server you will also have to install the Java Development Kit (JDK). We recommend that you use the same version of the JDK as required by the Keycloak server.

Running the Keycloak server

See the instructions in the Keycloak server app.

Running the development server

Now that the Keycloak sever is running it's time to run the development server for the Admin UI. This server is used to build the Admin UI in a manner that it can be iterated on quickly in a browser, using features such as Hot Module Replacement (HMR) and Fast Refresh.

To start the development server run the following command:

pnpm dev

Once the process of optimization is done your browser will automatically open your local host on port 8080. From here you will be redirected to the Keycloak server to authenticate, which you can do with the default credentials (admin/admin).

You can now start making changes to the source code, and they will be reflected in your browser.

Building as a Keycloak theme

If you want to build the application using Maven and produce a JAR that can be installed directly into Keycloak, check out the Keycloak theme documentation.

Linting

Every time you create a commit it should be automatically linted and formatted for you. It is also possible to trigger the linting manually:

pnpm lint

Integration testing with Playwright

This repository contains integration tests developed with the Playwright framework.

Prerequisites

Ensure the Keycloak and development server are running as outlined previously in this document.

Running the tests

You can run the tests using the interactive graphical user Visual Studio Code plugin

Alternatively the tests can also run headless as follows:

pnpm test:integration