(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($.proxy(function () { utils.closeAllChatBoxes(); utils.openControlBox(); utils.openRoomsPanel(); var roomspanel = this.chatboxesview.views.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(); $('.toggle-online-users').click(); }, converse)); it("shows users currently present in the room", $.proxy(function () { var chatroomview = this.chatboxesview.views['lounge@muc.localhost'], $participant_list; var roster = {}, room = {}, i; for (i=0; i