Resolve "Add Delete-Everything button"
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)
Merge request reports
Activity
added To Do Variant: HCP Variant: Pat labels
assigned to @james-jenkinson
- Resolved by James Jenkinson
- Resolved by James Jenkinson
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 30 commits
Toggle commit listmentioned in commit c22d6f9b