Skip to content

Commit

Permalink
Fix: The adaptive card manifest should not be saved. (#2902)
Browse files Browse the repository at this point in the history
* [Fix] The adaptive card manifest should not be saved.

An empty adaptive card manifest was getting saved with this change the adaptive card manifest should not be saved.

* Updated test cases, added changeset info

---------

Co-authored-by: Klaus Keller <[email protected]>
  • Loading branch information
Sharmavksh and Klaus-Keller authored Feb 24, 2025
1 parent 4859d13 commit afbb147
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-cups-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sap-ux/cards-editor-middleware': patch
---

The adaptive card manifest should not be saved
1 change: 0 additions & 1 deletion packages/cards-editor-middleware/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ module.exports = async ({ resources }: MiddlewareParameters<any>): Promise<Reque
const multipleCards = utils.prepareCardTypesForSaving(manifests);

await promises.writeFile(join(fullPath, file), multipleCards.integration);
await promises.writeFile(join(fullPath, 'adaptive-' + file), multipleCards.adaptive);

const oManifest = JSON.parse(await manifest.getString());

Expand Down
2 changes: 1 addition & 1 deletion packages/cards-editor-middleware/test/unit/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('sap-cards-generator', () => {
const server = await getTestServer('lrop-v4');
const response = await server.post(sapCardsGenerator.ApiRoutes.cardsStore).send(payload);
expect(response.status).toBe(201);
expect(mockFsPromisesWriteFile).toHaveBeenCalledTimes(3);
expect(mockFsPromisesWriteFile).toHaveBeenCalledTimes(2);
});
});

Expand Down

0 comments on commit afbb147

Please sign in to comment.