Skip to content
Snippets Groups Projects

Resolve "Add Delete-Everything button"

Merged James Jenkinson requested to merge 215-add-delete-everything-button into main
1 unresolved thread

Icon

I haven't added an icon, as I expect it's likely that this method will end up being moved into settings or somewhere similar

Bugfix

The clear method of the indexed db service wasn't working, the promise was never resolving. It took a while to figure out why, as there was no error message, but it was due to the request method being called with read permissions.

I added a try-catch block with a console.error call (for whatever reason it wasn't getting caught by the generic error handling), so that should it happen again it'll be quicker to diagnose

Closes #215 (closed)

Edited by James Jenkinson

Merge request reports

Checking pipeline status.

Merged by Andreas PittrichAndreas Pittrich 2 years ago (Jan 25, 2023 10:47pm UTC)

Loading

Pipeline #9317 failed

Pipeline failed for c22d6f9b on main

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Hanhoan Truong approved this merge request

    approved this merge request

    • Looks good to me. Approved when the typos are fixed :D

      Thanks for fixing IndexDBService, I found that indexedDB was really hard to debug and it feels very unintuitive. Good job tackling that!

      Oh there is one last thing. Please add unit test, checking if really everything gets deleted. (Alternative add a new issue for writing that specific unit test :D)

      Update: It's enough to inject/provide some generic StorageService as a Spy and check if the clear Method have been called for all Stores. If the Storage actually gets cleared should be part of a unit test for that particular storage (not part of this issue)

      Also it works nicely alreday :D

      Edited by Andreas Pittrich
    • Added a unit test

    • Please register or sign in to reply
  • James Jenkinson resolved all threads

    resolved all threads

  • James Jenkinson resolved all threads

    resolved all threads

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 5962b5e2 - Add unit test for delete action

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • James Jenkinson added 30 commits

    added 30 commits

    Compare with previous version

  • awesome, thanks :)

  • Andreas Pittrich approved this merge request

    approved this merge request

  • mentioned in commit c22d6f9b

  • Please register or sign in to reply
    Loading