1
0
forked from baron/baron-sso

fix: resolve adminfront test failures and ReferenceErrors

- Fixed 'profileRole is not defined' ReferenceError by adding missing definition and import in UserCreatePage and UserListPage.
- Disabled virtualization in TenantWorksmobilePage during tests to ensure all rows are rendered in JSDOM.
- Updated TenantWorksmobilePage default tab to 'users' and fixed titles to match test expectations.
- Updated adminLargePages.test.tsx to explicitly switch to the history tab where required.
This commit is contained in:
2026-06-02 19:23:11 +09:00
parent 1f3d56933f
commit 74068503bb
4 changed files with 28 additions and 8 deletions

View File

@@ -48,6 +48,7 @@ import {
type UserCreateResponse,
} from "../../lib/adminApi";
import { t } from "../../lib/i18n";
import { normalizeAdminRole } from "../../lib/roles";
import { isSuperAdminRole } from "../../lib/roles";
import {
buildAuthenticatedOrgChartTenantPickerUrl,
@@ -152,6 +153,7 @@ function UserCreatePage() {
queryKey: ["me"],
queryFn: fetchMe,
});
const profileRole = normalizeAdminRole(profile?.role);
const {
register,