Skip to content
This repository has been archived by the owner on Mar 26, 2022. It is now read-only.

Commit

Permalink
deleted consoles.log
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosCl98 committed Apr 29, 2019
1 parent 9cd3b24 commit 82d7436
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ $('document').ready(async () => {
user = await session.getUser();
notifications = new Notifier(user);
changeView(true);
console.log("User")
console.log(user)
let urlFolder = await FolderManager.getUrlFolder(user.id);
console.log("URL: " + urlFolder);
await FolderManager.checkDechatFolder(urlFolder);
await initializeGroups();
loadInitialContacts();
Expand Down Expand Up @@ -93,8 +90,6 @@ $("#add-group").click(async () => {
$("#mesgs").append(content);
var friends = await query.getFriends();
friends = removeDupes(friends, "id");
console.log("amigos")
console.log(friends)
for (var friend of friends) {
$("#group-candidates").append("<label><input type=checkbox class='candidate' name='" + friend.id + "'/> " + friend.name + "</label></br>");
}
Expand All @@ -105,7 +100,6 @@ $("#add-group").click(async () => {
selected.push($(this).attr("name"));
})
selected.push(user.id);
console.log(selected);
var name = $("#group-name").val();
const rejected = await chatManager.createGroup(name, selected, user.id);

Expand Down Expand Up @@ -228,7 +222,6 @@ async function startChat(friend, i) {
await chat.init(); //Initializate sentMessages array

//We start the chat when we make sure we have the folder created.
console.log("Chat with " + friend.id + " opened")
$("#mesgs").empty(); //Delete all the content of mesgs

$(".profile_bar").empty(); //Empty profile upper bar
Expand Down Expand Up @@ -268,7 +261,7 @@ async function startChat(friend, i) {
if ($("#contentText" + i).val().length > 0)
$("#msg_history" + i).append(messageContent);

//console.log(i)

sendMessage(chat, i, user, friend);
// Get the input field
});
Expand All @@ -294,7 +287,6 @@ async function startChat(friend, i) {
}

async function startGroupChat(group, i) {
console.log("Group chat " + group.id + " opened")

$("#mesgs").empty(); //Delete all the content of mesgs

Expand Down Expand Up @@ -373,7 +365,7 @@ async function addEnterListener(chat, i, user, friend) {
if ($("#contentText" + i).val().length > 0)
$("#msg_history" + i).append(messageContent);

//console.log(i)

sendMessage(chat, i, user, friend);
});

Expand Down Expand Up @@ -405,7 +397,6 @@ async function addGroupEnterListener(group, i) {
if ($("#contentText" + i).val().length > 0)
$("#msg_history" + i).append(messageContent);

//console.log(i)
sendGroupMessage(group, i);
});

Expand Down Expand Up @@ -474,7 +465,6 @@ function updateUIMessages(messages, index) {
"</div>"
"</div>";
}
//console.log("Messages loop " + messages[i].content);
$("#msg_history" + index).append(sentMessage);
}

Expand All @@ -486,9 +476,7 @@ function updateUIMessages(messages, index) {
async function updateGroupUIMessages(messages, index) {
$("#msg_history" + index).empty();
var i;
console.log(messages)
for (i = 0; i < messages.length; i++) {
console.log(messages[i])
let sentMessage;
var userToCompare = "https://" + messages[i].user + "/profile/card#me";
let msgContent;
Expand Down
11 changes: 11 additions & 0 deletions test/ChatManagerTest/foldermanager.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const folderManager = require("../../src/lib/ChatManager/ChatWriter/FolderManager");
const fc = require("solid-file-client");

describe('Methods of folder', () => {
const folderRoute = "https://marcoslpz1998.solid.community/dechat/marcoslpz1999.solid/";
it("Read Folder", async function(){
const folder = await folderManager.readFolder(folderRoute);
expect(folder).toBe("Paco");

})
})

0 comments on commit 82d7436

Please sign in to comment.