PLT-4430 improve slow channel switching (#4331)

* PLT-4430 improve slow channel switching

* Update client side unit tests

* Convert getChannelsUnread to getMyChannelMembers and address other feedback

* Pull channel members on websocket reconnect
This commit is contained in:
enahum
2016-10-27 12:24:30 -03:00
committed by Harrison Healey
parent 14ce471311
commit f82667f3b8
22 changed files with 271 additions and 117 deletions

View File

@@ -232,7 +232,7 @@ describe('Client.Channels', function() {
TestHelper.initBasic(() => {
TestHelper.basicClient().getChannels(
function(data) {
assert.equal(data.channels.length, 3);
assert.equal(data.length, 3);
done();
},
function(err) {
@@ -261,7 +261,7 @@ describe('Client.Channels', function() {
TestHelper.initBasic(() => {
TestHelper.basicClient().getMoreChannels(
function(data) {
assert.equal(data.channels.length, 0);
assert.equal(data.length, 0);
done();
},
function(err) {
@@ -285,6 +285,20 @@ describe('Client.Channels', function() {
});
});
it('getMyChannelMembers', function(done) {
TestHelper.initBasic(() => {
TestHelper.basicClient().getMyChannelMembers(
function(data) {
assert.equal(data.length > 0, true);
done();
},
function(err) {
done(new Error(err.message));
}
);
});
});
it('getChannelStats', function(done) {
TestHelper.initBasic(() => {
TestHelper.basicClient().getChannelStats(