Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
veD-tnayrB opened this issue Nov 16, 2023 · 0 comments
Assignees

Comments

@veD-tnayrB
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants