Description
Hello,
I've encountered an issue related to the delete
method in the feature/dev-uses-cases
branch, specifically when using IndexedDB as the data source. The method does not seem to delete the item from IndexedDB as expected. This issue is dependent on the resolution of another issue: #16.
Steps to reproduce:
- Instantiate a new item and optionally load it with data for easier identification.
- Execute the
delete
method on this item.
2.5. Check the response from thedelete
method (the response is simplytrue
, which deviates from the standard response format used by other methods:{status: true}
). - Search for the item in IndexedDB.
After performing these steps, the item is still present in IndexedDB, indicating a failure in the deletion process. However, the method's response incorrectly indicates a successful operation (true
).
To replicate this issue, use the following steps in the feature/dev-uses-cases
branch at http://localhost:950/ with the no-provider entities use case:
// First, create an item:
var {createAItem} = await beyond.import('@beyond-js/reactive-tests/uses-cases/no-providers');
await createAItem();
// Then, using the ID of the created item, attempt to delete it:
var {deleteAItem} = await beyond.import('@beyond-js/reactive-tests/uses-cases/no-providers');
await deleteAItem('ITEM_ID');
The test is designed to throw an error in both failure cases. You can review the implementation of this test in tests\modules\uses-cases\no-providers\scripts\item\delete.ts
.
Any help in solving this problem would be greatly appreciated.
Thank you very much.