From f82667f3b86202dafff3a2a4ea56aec74c80316d Mon Sep 17 00:00:00 2001
From: enahum <nahumhbl@gmail.com>
Date: Thu, 27 Oct 2016 12:24:30 -0300
Subject: 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
---
 webapp/tests/client_channel.test.jsx | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

(limited to 'webapp/tests/client_channel.test.jsx')

diff --git a/webapp/tests/client_channel.test.jsx b/webapp/tests/client_channel.test.jsx
index 92145f6e1..b7fa57dc8 100644
--- a/webapp/tests/client_channel.test.jsx
+++ b/webapp/tests/client_channel.test.jsx
@@ -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(
-- 
cgit v1.2.3-1-g7c22

