Commit 330b1434 authored by JC Brand's avatar JC Brand

Completely remove strophe.roster as a dependency.

parent a4475a54
This diff is collapsed.
......@@ -52,11 +52,8 @@
<script>
require(['converse'], function (converse) {
converse.initialize({
auto_login: true,
allow_registration: false,
allow_logout: false,
authentication: "anonymous",
jid: "opkode.im",
allow_logout: true,
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
i18n: locales['en'], // Refer to ./locale/locales.js to see which locales are supported
keepalive: true,
......
......@@ -925,7 +925,6 @@
* https://github.com/jcbrand/converse.js/issues/262
*/
this.rosterview.model.reset();
spyOn(this.roster, 'clearCache').andCallThrough();
expect(this.roster.pluck('jid').length).toBe(0);
var stanza = $pres({from: 'data@enterprise/resource', type: 'subscribe'});
......@@ -956,8 +955,7 @@
name: 'Benvolio',
subscription:'both'
}).c('group').t('Friends');
this.connection.roster._onReceiveRosterSuccess(null, stanza.tree());
expect(this.roster.clearCache).toHaveBeenCalled();
this.roster.onReceivedFromServer(stanza.tree());
expect(_.contains(this.roster.pluck('jid'), 'data@enterprise')).toBeTruthy();
}, converse));
......
......@@ -12,7 +12,8 @@
describe("Profiling", function() {
beforeEach(function() {
converse.connection.roster.items = [];
test_utils.clearBrowserStorage();
converse.rosterview.model.reset();
converse.connection._changeConnectStatus(Strophe.Status.CONNECTED);
});
......@@ -36,7 +37,7 @@
}).c('group').t(group).up().up();
}
});
this.connection.roster._onReceiveRosterSuccess(null, stanza.tree());
this.roster.onReceivedFromServer(stanza.tree());
expect(this.roster.clearCache).toHaveBeenCalled();
expect(this.roster.pluck('jid').length).toBe(400);
}, converse));
......@@ -62,7 +63,7 @@
}).c('group').t(group).up().up();
}
});
this.connection.roster._onReceiveRosterSuccess(null, stanza.tree());
this.roster.onReceivedFromServer(stanza.tree());
expect(this.roster.clearCache).toHaveBeenCalled();
//expect(this.roster.pluck('jid').length).toBe(400);
}, converse));
......
......@@ -4,7 +4,6 @@ define("converse-dependencies", [
"otr",
"moment",
"strophe",
"strophe.roster",
"strophe.vcard",
"strophe.disco",
"backbone.browserStorage",
......
......@@ -3,7 +3,6 @@ define("converse-dependencies", [
"utils",
"moment",
"strophe",
"strophe.roster",
"strophe.vcard",
"strophe.disco",
"backbone.browserStorage",
......
......@@ -3,7 +3,6 @@ define("converse-dependencies", [
"utils",
"moment",
"strophe",
"strophe.roster",
"strophe.vcard",
"strophe.disco",
"bootstrapJS", // XXX: Can be removed, only for https://conversejs.org
......
......@@ -5,7 +5,6 @@ define("converse-dependencies", [
"otr",
"moment",
"strophe",
"strophe.roster",
"strophe.vcard",
"strophe.disco",
"bootstrapJS", // XXX: Only for https://conversejs.org
......
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