Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

MAT-7685 and MAT-7684 add label for PositiveInt and UnsignedInt #751

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ describe("TypeEditor Component", () => {
structureDefinition={null}
/>
);
const inputField = screen.getByTestId("integer-field-input-Integer Field");
const inputField = screen.getByTestId("integer-field-input-");
expect(inputField).toBeInTheDocument();
expect(inputField.value).toBe("1234");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ const TypeEditor = ({
canEdit={true}
structureDefinition={structureDefinition}
fieldRequired={required}
label={``}
label={_.capitalize(
structureDefinition?.id?.substring(
structureDefinition?.id?.lastIndexOf(".") + 1
)
)}
onChange={onChange}
value={value}
integerType={IntegerType.POSITIVE_INT}
Expand All @@ -132,7 +136,11 @@ const TypeEditor = ({
canEdit={true}
structureDefinition={structureDefinition}
fieldRequired={required}
label={`Integer Field`}
label={_.capitalize(
structureDefinition?.id?.substring(
structureDefinition?.id?.lastIndexOf(".") + 1
)
)}
onChange={onChange}
value={value}
integerType={IntegerType.UNSIGNED}
Expand Down
Loading