Skip to content

Commit 0fd23c3

Browse files
Revert unit test of service api for draft-enabled entity. (#131)
Because after internal discussions within CAP, it seems they now support running queries on the draft-enabled entity in the application service, we can revert the previous tests for the service API. Related issue: https://github.tools.sap/cap/issues/issues/16292
1 parent 36de362 commit 0fd23c3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/integration/service-api.test.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,9 @@ describe("change log integration test", () => {
143143
},
144144
],
145145
};
146-
await INSERT.into(adminService.entities.BookStores).entries(bookStoreData);
147146

148-
// REVISIT: CAP currently does not support run queries on the draft-enabled entity on application service (details in CAP/Issue#16292)
149-
// await adminService.run(INSERT.into(adminService.entities.BookStores).entries(bookStoreData));
147+
// CAP currently support run queries on the draft-enabled entity on application service, so we can re-enable it. (details in CAP/Issue#16292)
148+
await adminService.run(INSERT.into(adminService.entities.BookStores).entries(bookStoreData));
150149

151150
let changes = await SELECT.from(ChangeView).where({
152151
entity: "sap.capire.bookshop.BookStores",
@@ -432,10 +431,9 @@ describe("change log integration test", () => {
432431
validOn: "2022-01-01",
433432
},
434433
};
435-
await INSERT.into(adminService.entities.BookStores).entries(bookStoreData);
436434

437-
// REVISIT: CAP currently does not support run queries on the draft-enabled entity on application service (details in CAP/Issue#16292)
438-
// await adminService.run(INSERT.into(adminService.entities.BookStores).entries(bookStoreData));
435+
// CAP currently support run queries on the draft-enabled entity on application service, so we can re-enable it. (details in CAP/Issue#16292)
436+
await adminService.run(INSERT.into(adminService.entities.BookStores).entries(bookStoreData));
439437

440438
let changes = await SELECT.from(ChangeView).where({
441439
entity: "sap.capire.bookshop.BookStoreRegistry",

0 commit comments

Comments
 (0)