{"action":"created","issue":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/91","repository_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X","labels_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/91/comments","events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/91/events","html_url":"https://github.com/IMA-WorldHealth/bhima-2.X/issues/91","id":132168378,"number":91,"title":"Need a way to clear localForage","user":{"login":"jniles","id":896472,"avatar_url":"https://avatars.githubusercontent.com/u/896472?v=3","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/labels/programming","name":"programming","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"jniles","id":896472,"avatar_url":"https://avatars.githubusercontent.com/u/896472?v=3","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-02-08T15:12:40Z","updated_at":"2016-04-08T07:27:39Z","closed_at":"2016-04-08T07:27:39Z","body":"We use [localForage](https://github.com/mozilla/localForage) for our local storage wrapper.   There currently isn't a good way to selectively delete items from a localForage instance, during e2e tests.  It would be nice to have a generic function to allow clearing a localforage namespace, usable from our e2e tests.  Something like:\r\n```js\r\nit('clears the provided namespace', function () {\r\n  var namespace = 'example';\r\n  clearLocalStorage(namespace);\r\n\r\n  // .. other tests ..\r\n});\r\n```\r\n\r\nThere may be a need to use `browser.wait()` or `browser.executeAsyncScript()` to accomplish this.  As we begin testing functionality, we'll need this tool.\r\n\r\n... alternatively, we could drop support for localForage and use the window storage directly ([through some](https://github.com/grevory/angular-local-storage) [Angular wrapper](https://github.com/gsklee/ngStorage)).  I see no reason to support such a flexible storage solution if our only browser support is for Chrome.  We could also simply write our own wrapper."},"comment":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/comments/207269410","html_url":"https://github.com/IMA-WorldHealth/bhima-2.X/issues/91#issuecomment-207269410","issue_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/91","id":207269410,"user":{"login":"jniles","id":896472,"avatar_url":"https://avatars.githubusercontent.com/u/896472?v=3","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T07:27:39Z","updated_at":"2016-04-08T07:27:39Z","body":"Closing this as we no longer use localForage."}}