Skip to content

Commit

Permalink
Merge pull request #164 from Deltares/reports-module-instance-name
Browse files Browse the repository at this point in the history
reports also return moduleInstanceName.
  • Loading branch information
ekkelenkamp authored Sep 25, 2024
2 parents 8c46106 + 268c509 commit 96529ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/response/reports/reportsResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export interface Report {
* the module instance id of the report
*/
moduleInstanceId: string;
/**
* the module instance name
*/
moduleInstanceName?: string;
/**
* the mime type of the report
*/
Expand Down
1 change: 1 addition & 0 deletions test/unit/fews/reports.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe("reports", function () {
if (results?.reports?.length === 1) {
const report = results.reports[0]
expect(report?.moduleInstanceId).toBe("GenerateReport")
expect(report?.moduleInstanceName).toBe("GenerateReportName")
expect(report?.mimeType).toBe("application/pdf")
expect(report?.items?.length).toBe(1);
if (report?.items.length === 1) {
Expand Down
1 change: 1 addition & 0 deletions test/unit/mock/reports.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"reports" : [ {
"moduleInstanceId" : "GenerateReport",
"moduleInstanceName" : "GenerateReportName",
"mimeType" : "application/pdf",
"items" : [ {
"moduleInstanceId" : "GenerateReport",
Expand Down

0 comments on commit 96529ce

Please sign in to comment.