mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user