Commit 718f75a4 authored by JC Brand's avatar JC Brand

Make sure sessionStorage is cleared

parent 4950bb91
......@@ -203,6 +203,11 @@
describe("Existing Contacts", $.proxy(function () {
beforeEach($.proxy(function () {
runs(function () {
converse.rosterview.model.reset();
converse.rosterview.render();
});
waits(50);
runs(function () {
utils.openControlBox();
});
......
......@@ -9,6 +9,7 @@
} (this, function (mock, utils) {
return describe("The Converse Event Emitter", $.proxy(function(mock, utils) {
window.localStorage.clear();
window.sessionStorage.clear();
it("allows you to subscribe to emitted events", function () {
this.callback = function () {};
......
......@@ -39,6 +39,7 @@ require([
// Set up converse.js
window.converse_api = converse;
window.localStorage.clear();
window.sessionStorage.clear();
converse.initialize({
prebind: false,
xhr_user_search: false,
......
......@@ -89,6 +89,11 @@
return converse.rosterview.get(jid).openChat(mock.event);
};
utils.clearBrowserStorage = function () {
window.localStorage.clear();
window.sessionStorage.clear();
};
utils.clearChatBoxMessages = function (jid) {
var view = converse.chatboxviews.get(jid);
view.$el.find('.chat-content').empty();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment