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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user