Skip to content

😟 Incorrect Deletion Behavior in delete Method with IndexedDB in feature/dev-uses-cases Branch #17

Closed
@veD-tnayrB

Description

@veD-tnayrB

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:

  1. Instantiate a new item and optionally load it with data for easier identification.
  2. Execute the delete method on this item.
    2.5. Check the response from the delete method (the response is simply true, which deviates from the standard response format used by other methods: {status: true}).
  3. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions