Skip to content

Commit

Permalink
368 Test for new HTTPAnnotationService special case
Browse files Browse the repository at this point in the history
  • Loading branch information
pgarrison committed Dec 19, 2024
1 parent 022377f commit 083456f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/entity/Annotation/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ export const annotationsJson = [
description: "Imaging objective",
type: "Number",
},
{
annotationName: "Local File Path",
annotationDisplayName: "Local File Path",
description: "Path to file in on-premises storage.",
type: "Text",
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ describe("HttpAnnotationService", () => {
);
expect(annotations[0]).to.be.instanceOf(Annotation);
});

it("renames Local File Path to File Path (Local)", async () => {
const annotationService = new HttpAnnotationService({
fileExplorerServiceBaseUrl: FESBaseUrl.TEST,
httpClient,
});
const annotations = await annotationService.fetchAnnotations();
const localPathAnnotation = annotations.find((a) => a.name === "Local File Path");
expect(localPathAnnotation?.displayName).to.equal("File Path (Local)");
});
});

describe("fetchAnnotationValues", () => {
Expand Down

0 comments on commit 083456f

Please sign in to comment.