Skip to content

added type check to playwright tests - #51035

Open
edewit wants to merge 1 commit into
keycloak:mainfrom
edewit:better-type-check
Open

added type check to playwright tests#51035
edewit wants to merge 1 commit into
keycloak:mainfrom
edewit:better-type-check

Conversation

@edewit

@edewit edewit commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

fixes: #38056
Signed-off-by: Erik Jan de Wit erikjan.dewit@gmail.com

fixes: keycloak#38056
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Copilot AI review requested due to automatic review settings July 20, 2026 11:58
@edewit
edewit requested review from a team as code owners July 20, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI type-checking for Admin and Account UI Playwright tests, addressing #38056.

Changes:

  • Adds test:typecheck scripts and CI steps.
  • Separates runtime and type-only Playwright imports.
  • Moves test route generation into a dedicated utility.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/js-ci.yml Runs Playwright type checks in UI CI jobs.
js/apps/account-ui/package.json Adds Account UI test type-check script.
js/apps/admin-ui/package.json Adds Admin UI test type-check script.
js/apps/admin-ui/test/utils/routes.ts Adds typed route helpers for tests.
js/apps/admin-ui/test/utils/attributes.ts Uses a type-only Page import.
js/apps/admin-ui/test/utils/form.ts Uses type-only Playwright imports.
js/apps/admin-ui/test/utils/masthead.ts Uses a type-only Page import.
js/apps/admin-ui/test/utils/modal.ts Uses a type-only Page import.
js/apps/admin-ui/test/realm-settings/general.ts Uses a type-only Page import.
js/apps/admin-ui/test/permissions/policy.spec.ts Corrects the Playwright test import.
js/apps/admin-ui/test/autentication/flows.spec.ts Uses the test route utility.
js/apps/admin-ui/test/autentication/policies-ciba.spec.ts Uses the test route utility.
js/apps/admin-ui/test/autentication/policies.spec.ts Uses the test route utility.
js/apps/admin-ui/test/client-scope/main.spec.ts Uses test route helpers.
js/apps/admin-ui/test/client-scope/mappers.spec.ts Uses the test route utility.
js/apps/admin-ui/test/client-scope/oid4vci-client-scope.spec.ts Uses the test route utility.
js/apps/admin-ui/test/client-scope/oid4vci-mappers.spec.ts Uses the test route utility.
js/apps/admin-ui/test/client-scope/scope.spec.ts Uses the test route utility.
js/apps/admin-ui/test/clients/assign-oid4vci-client-scope.spec.ts Uses the test route utility.
js/apps/admin-ui/test/clients/ssf-receiver.spec.ts Uses the SSF test route helper.
js/apps/admin-ui/test/clients/ssf-stream.spec.ts Uses the SSF test route helper.
js/apps/admin-ui/test/clients/ssf-subjects.spec.ts Uses the SSF test route helper.
js/apps/admin-ui/test/clients/ssf.spec.ts Uses client test route helpers.
js/apps/admin-ui/test/realm-settings/oid4vci-attributes.spec.ts Uses the test route utility.
js/apps/admin-ui/test/users/main.spec.ts Uses user and realm test route helpers.
js/apps/admin-ui/test/workflows/workflow-user-tab.spec.ts Uses the user test route helper.

@keycloak-github-bot

Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.forms.BrowserFlowTest#testUserWithOneAdditionalFactorOtpSuccess

Keycloak CI - Base IT (5)

org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
...

Report flaky test

org.keycloak.testsuite.oauth.ClientAuthPostMethodTest#testPostAuthenticationNotAllowedWhenBasicRequested

Keycloak CI - Base IT (6)

java.lang.NullPointerException: Cannot read field "features" because the return value of "org.keycloak.common.Profile.getInstance()" is null
	at org.keycloak.common.Profile.isFeatureEnabled(Profile.java:534)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.<init>(OIDCClientSecretConfigWrapper.java:41)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.fromClientRepresentation(OIDCClientSecretConfigWrapper.java:49)
	at org.keycloak.testsuite.oauth.ClientAuthPostMethodTest.testPostAuthenticationNotAllowedWhenBasicRequested(ClientAuthPostMethodTest.java:141)
...

Report flaky test

org.keycloak.testsuite.oauth.ClientAuthPostMethodTest#testBasicAuthenticationNotAllowedWhenPostRequested

Keycloak CI - Base IT (6)

java.lang.NullPointerException: Cannot read field "features" because the return value of "org.keycloak.common.Profile.getInstance()" is null
	at org.keycloak.common.Profile.isFeatureEnabled(Profile.java:534)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.<init>(OIDCClientSecretConfigWrapper.java:41)
	at org.keycloak.protocol.oidc.OIDCClientSecretConfigWrapper.fromClientRepresentation(OIDCClientSecretConfigWrapper.java:49)
	at org.keycloak.testsuite.oauth.ClientAuthPostMethodTest.testBasicAuthenticationNotAllowedWhenPostRequested(ClientAuthPostMethodTest.java:112)
...

Report flaky test

@keycloak-github-bot keycloak-github-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type-check the Playwright tests in for the admin and account consoles

2 participants