Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAT-7675 Test Case Builder Component - Canonical #715

Merged
merged 2 commits into from
Dec 27, 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 @@ -25,6 +25,7 @@ export class FhirDefinitionsServiceApi {
case "uri":
case "url":
case "uuid":
case "canonical":
case "string":
case "http://hl7.org/fhirpath/System.String":
case "code":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,25 @@ describe("TypeEditor Component", () => {
expect(screen.getByTestId("url-input-field-URL")).toBeInTheDocument();
});

test("Should render canonical url type attribute", () => {
const handleChange = jest.fn();
const canonicalUri = "https://example.com/blog";
render(
<TypeEditor
type="canonical"
required={true}
value={canonicalUri}
onChange={handleChange}
structureDefinition={null}
canEdit={true}
label="instantiatesCanonical"
/>
);
expect(
screen.getByTestId("url-input-field-instantiatesCanonical")
).toHaveValue(canonicalUri);
});

test("Should render Instant component by instant", () => {
const handleChange = jest.fn();
render(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const TypeEditor = ({
/>
);
case "url":
case "canonical":
return (
<UrlComponent
canEdit={canEdit}
Expand Down
Loading