Skip to content

Fix account console tests for dev#27600

Merged
jonkoops merged 1 commit into
keycloak:mainfrom
hmlnarik:fix-pw-tests
Mar 7, 2024
Merged

Fix account console tests for dev#27600
jonkoops merged 1 commit into
keycloak:mainfrom
hmlnarik:fix-pw-tests

Conversation

@hmlnarik

@hmlnarik hmlnarik commented Mar 6, 2024

Copy link
Copy Markdown
Contributor

Fixes: #27604

Comment thread js/apps/account-ui/src/main.tsx Outdated
Comment thread js/apps/account-ui/src/routes.tsx Outdated
Comment thread js/apps/account-ui/test/account-security/linked-accounts.spec.ts Outdated
Comment thread js/apps/account-ui/test/utils.ts Outdated
Comment thread js/apps/account-ui/test/utils.ts Outdated
@jonkoops

jonkoops commented Mar 6, 2024

Copy link
Copy Markdown
Contributor

@hmlnarik exactly which tests are failing locally without these fixes? The Account Console doesn't support dynamically changing realms, so I would expect any realm change to be a full page load, setting the basename at that time.

@hmlnarik hmlnarik linked an issue Mar 6, 2024 that may be closed by this pull request
2 tasks
@hmlnarik

hmlnarik commented Mar 6, 2024

Copy link
Copy Markdown
Contributor Author

@hmlnarik exactly which tests are failing locally without these fixes? The Account Console doesn't support dynamically changing realms, so I would expect any realm change to be a full page load, setting the basename at that time.

KC server is run on server 8180 but the admin client was targetting only port 8080, assuming that the account UI and REST endpoints are served by the same server. Please see the details in the linked issue

The linked account tests which use both "groups" and "master" realms in a single test failed with
<Router basename="/realms/master/account"> is not able to match the URL "/realms/groups/account/account-security/device-activity" because it does not start with the basename, so the <Router> won't render anything. reported in the browser console.

@hmlnarik hmlnarik marked this pull request as ready for review March 6, 2024 13:46
@hmlnarik hmlnarik requested a review from a team as a code owner March 6, 2024 13:46
Comment thread js/apps/account-ui/src/routes.tsx Outdated
Fixes: keycloak#27604

Signed-off-by: Hynek Mlnarik <hmlnarik@redhat.com>
@jonkoops jonkoops merged commit 250e113 into keycloak:main Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Account console dev environment broken

2 participants