Dear Team,
in SAP CAPM application, adapted change log service for field is Active with below annotation and library.
- "@cap-js/change-tracking": "^1.0.7",
- annotateService.Product with {
isActive @changelog;
}
While writing a unit test in memory DB, if facing an issue, please help to solve the issue.
console.error
[error] - 500 > {
code: '500',
message: 'no such table: sap_changelog_ChangeLog in:\n' +
'INSERT INTO sap_changelog_ChangeLog (entity,entityKey,serviceEntity,changes) VALUES (?,?,?,?)'
}
Please give suggestion how to handle mock the changelog service or create temp CSV file to avoid error.
Sample code :
it("Create Product OData Service with delegate is not provided", async () => {
const inputProduct = {
"externalID": "12345",
"name": "Project Alpha",
"productOwner_ID": "101",
"delegate_ID": null,
"testCoordinator_ID": "103",
"testLead_ID": "104"
};
const { status, statusText, data } = await POST(
"/odata/v4/service/Product", inputProduct
);
draftId = data.ID;
expect(status).toBe(201);
expect(statusText).toBe("Created");
console.log(draftId)
});
it("Activate the draft (SAVE button) ", async () => {
const response = await POST(
`/odata/v4/service/Product(ID=${draftId},IsActiveEntity=false)/Service.draftActivate`
);
expect(response.status).toBe(201);
});
Thank & Regards,
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.