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

Commit

Permalink
Merge pull request #751 from MeasureAuthoringTool/MAT-7685_PositiveInt
Browse files Browse the repository at this point in the history
MAT-7685 and MAT-7684 add label for PositiveInt and UnsignedInt
  • Loading branch information
sb-cecilialiu authored Oct 30, 2024
2 parents 382daa7 + 90c0cd1 commit 9e0c036
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit 9e0c036

Please sign in to comment.