(function (root, factory) { define([ "mock", "utils" ], function (mock, utils) { return factory(mock, utils); } ); } (this, function (mock, utils) { return describe("ChatRooms", $.proxy(function (mock, utils) { describe("A Chat Room", $.proxy(function () { beforeEach(function () { runs(function () { utils.closeAllChatBoxes(); }); waits(250); runs(function () { utils.openControlBox(); }); waits(250); runs(function () { utils.openRoomsPanel(); }); waits(501); runs(function () { // Open a new chatroom var roomspanel = converse.chatboxviews.get('controlbox').roomspanel; var $input = roomspanel.$el.find('input.new-chatroom-name'); var $nick = roomspanel.$el.find('input.new-chatroom-nick'); var $server = roomspanel.$el.find('input.new-chatroom-server'); $input.val('lounge'); $nick.val('dummy'); $server.val('muc.localhost'); roomspanel.$el.find('form').submit(); }); waits(250); runs(function () { utils.closeControlBox(); }); waits(250); runs(function () {}); }); it("shows users currently present in the room", $.proxy(function () { var chatroomview = this.chatboxviews.get('lounge@muc.localhost'), $participant_list; var roster = {}, room = {}, i; for (i=0; i