PLT-5109/PLT-5112 Fixed commented out unit tests (#4951)

* Removed note about unconfirmed race condition

* Fixed unit tests in client_channel.test.jsx

* Fixed updateActive unit test on client
This commit is contained in:
Harrison Healey
2017-01-04 09:30:14 -05:00
committed by Corey Hulen
parent c0a5f9fbef
commit 63d2851ec7
3 changed files with 16 additions and 35 deletions

View File

@@ -136,7 +136,6 @@ function populateDMChannelsWithProfiles(userIds) {
const currentUserId = UserStore.getCurrentId();
for (let i = 0; i < userIds.length; i++) {
// TODO There's a race condition here for DM channels if those channels aren't loaded yet
const channelName = getDirectChannelName(currentUserId, userIds[i]);
const channel = ChannelStore.getByName(channelName);
if (channel) {

View File

@@ -25,25 +25,16 @@ describe('Client.Channels', function() {
});
});
/* TODO: FIX THIS TEST
it('createDirectChannel', function(done) {
TestHelper.initBasic(() => {
TestHelper.basicClient().createUser(
TestHelper.fakeUser(),
function(user2) {
TestHelper.basicClient().addUserToTeam(
TestHelper.basicClient().createDirectChannel(
user2.id,
function() {
TestHelper.basicClient().createDirectChannel(
user2.id,
function(data) {
assert.equal(data.id.length > 0, true);
done();
},
function(err) {
done(new Error(err.message));
}
);
function(data) {
assert.equal(data.id.length > 0, true);
done();
},
function(err) {
done(new Error(err.message));
@@ -56,7 +47,6 @@ describe('Client.Channels', function() {
);
});
});
*/
it('updateChannel', function(done) {
TestHelper.initBasic(() => {
@@ -394,26 +384,20 @@ describe('Client.Channels', function() {
});
});
/* TODO FIX THIS TEST
it('addChannelMember', function(done) {
TestHelper.initBasic(() => {
TestHelper.basicClient().createUser(
TestHelper.basicClient().createUserWithInvite(
TestHelper.fakeUser(),
null,
null,
TestHelper.basicTeam().invite_id,
function(user2) {
TestHelper.basicClient().addUserToTeam(
TestHelper.basicClient().addChannelMember(
TestHelper.basicChannel().id,
user2.id,
function() {
TestHelper.basicClient().addChannelMember(
TestHelper.basicChannel().id,
user2.id,
function(data) {
assert.equal(data.channel_id.length > 0, true);
done();
},
function(err) {
done(new Error(err.message));
}
);
function(data) {
assert.equal(data.channel_id.length > 0, true);
done();
},
function(err) {
done(new Error(err.message));
@@ -426,7 +410,6 @@ describe('Client.Channels', function() {
);
});
});
*/
it('removeChannelMember', function(done) {
TestHelper.initBasic(() => {

View File

@@ -258,16 +258,15 @@ describe('Client.User', function() {
});
});
/* TODO: FIX THIS TEST
it('updateActive', function(done) {
TestHelper.initBasic(() => {
var user = TestHelper.basicUser();
const user = TestHelper.basicUser();
TestHelper.basicClient().updateActive(
user.id,
false,
function(data) {
assert.equal(data.last_activity_at > 0, true);
assert.ok(data.delete_at > 0);
done();
},
function(err) {
@@ -275,7 +274,7 @@ describe('Client.User', function() {
}
);
});
});*/
});
it('sendPasswordReset', function(done) {
TestHelper.initBasic(() => {