Skip to content

Commit

Permalink
Revert unit test of service api for draft-enabled entity. (#131)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Sv7enNowitzki authored Oct 29, 2024
1 parent 36de362 commit 0fd23c3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/integration/service-api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,9 @@ describe("change log integration test", () => {
},
],
};
await INSERT.into(adminService.entities.BookStores).entries(bookStoreData);

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

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

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

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

0 comments on commit 0fd23c3

Please sign in to comment.