feat(map): render classified unit identity aspects
This commit is contained in:
@@ -47,6 +47,24 @@ test("restricted identifiers require an explicit restricted presentation class",
|
||||
);
|
||||
});
|
||||
|
||||
test("string list fields are provider-neutral attribute presentations", () => {
|
||||
const profile = structuredClone(registry.profiles[0]);
|
||||
const field = profile.tabs[0].sections[0].fields[0];
|
||||
field.field = "custom_fields";
|
||||
field.label = "Пользовательские поля";
|
||||
field.format = "string_list";
|
||||
assert.equal(
|
||||
normalizeMapSubjectDetailProfile(profile).tabs[0].sections[0].fields[0].format,
|
||||
"string_list",
|
||||
);
|
||||
field.source = "fact";
|
||||
field.field = "sourceId";
|
||||
assert.throws(
|
||||
() => normalizeMapSubjectDetailProfile(profile),
|
||||
/map_subject_detail_profile_string_list_source_invalid/,
|
||||
);
|
||||
});
|
||||
|
||||
test("profiles reject unknown schema fields and duplicate presentation ids", () => {
|
||||
const unknown = structuredClone(registry.profiles[0]);
|
||||
unknown.provider = "gelios";
|
||||
|
||||
Reference in New Issue
Block a user