Skip to content

Commit

Permalink
Fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aramovic79 committed Sep 9, 2024
1 parent 31a6f12 commit b546846
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions __tests__/__snapshots__/ord.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`Tests for default ORD document Successfully create ORD Documents with d
"apiResources": [
{
"apiProtocol": "odata-v4",
"description": "Here we have the description for AdminService",
"description": "AdminService",
"entityTypeMappings": [
{
"entityTypeTargets": [],
Expand Down Expand Up @@ -46,14 +46,14 @@ exports[`Tests for default ORD document Successfully create ORD Documents with d
"url": "/.well-known/open-resource-discovery/v1/api-metadata/AdminService.edmx",
},
],
"shortDescription": "Here we have the shortDescription for AdminService",
"title": "The service is for AdminService",
"shortDescription": "AdminService",
"title": "AdminService",
"version": "1.0.0",
"visibility": "public",
},
{
"apiProtocol": "odata-v4",
"description": "Here we have the description for CatalogService",
"description": "CatalogService",
"entityTypeMappings": [
{
"entityTypeTargets": [],
Expand Down Expand Up @@ -93,8 +93,8 @@ exports[`Tests for default ORD document Successfully create ORD Documents with d
"url": "/.well-known/open-resource-discovery/v1/api-metadata/CatalogService.edmx",
},
],
"shortDescription": "Here we have the shortDescription for CatalogService",
"title": "The service is for CatalogService",
"shortDescription": "CatalogService",
"title": "CatalogService",
"version": "1.0.0",
"visibility": "public",
},
Expand All @@ -104,12 +104,12 @@ exports[`Tests for default ORD document Successfully create ORD Documents with d
{
"groupId": "sap.cds:service:capjs.ord:undefined.AdminService",
"groupTypeId": "sap.cds:service",
"title": "Admin Service Title",
"title": "Admin Service",
},
{
"groupId": "sap.cds:service:capjs.ord:undefined.CatalogService",
"groupTypeId": "sap.cds:service",
"title": "Catalog Service Title",
"title": "Catalog Service",
},
],
"openResourceDiscovery": "1.9",
Expand Down
6 changes: 3 additions & 3 deletions __tests__/unittest/__snapshots__/templates.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports[`templates fCreateAPIResourceTemplate should create API resource templat
[
{
"apiProtocol": "odata-v4",
"description": "Here we have the description for MyService",
"description": "MyService",
"entityTypeMappings": [
{
"entityTypeTargets": undefined,
Expand Down Expand Up @@ -70,8 +70,8 @@ exports[`templates fCreateAPIResourceTemplate should create API resource templat
"url": "/.well-known/open-resource-discovery/v1/api-metadata/MyService.edmx",
},
],
"shortDescription": "Here we have the shortDescription for MyService",
"title": "The service is for MyService",
"shortDescription": "MyService",
"title": "MyService",
"version": "1.0.0",
"visibility": "public",
},
Expand Down
4 changes: 2 additions & 2 deletions __tests__/unittest/templates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('templates', () => {
const testResult = {
groupId: 'sap.cds:service:customer:undefined.testServiceName',
groupTypeId: 'sap.cds:service',
title: 'test Service Title'
title: 'test Service'
};
expect(templates.fCreateGroupsTemplateForService(testSrv, linkedModel, testGroupIds)).toEqual(testResult);
});
Expand All @@ -80,7 +80,7 @@ describe('templates', () => {
groupId: 'sap.cds:service:customer:undefined.testEventName',
groupTypeId: 'sap.cds:service',
// TODO: space because of service name missing
title: ' Service Title'
title: ' Service'
};
expect(templates.fCreateGroupsTemplateForEvent(tesEvent, linkedModel, testGroupIds)).toEqual(testResult);
});
Expand Down

0 comments on commit b546846

Please sign in to comment.