Commit 7b6dfff9 authored by JC Brand's avatar JC Brand

Fix tests.

Elements in chat rooms are now hidden, instead of removed. Update tests to
reflect this.
parent 090888ad
...@@ -259,10 +259,10 @@ ...@@ -259,10 +259,10 @@
var view = this.chatboxviews.get('lounge@localhost'); var view = this.chatboxviews.get('lounge@localhost');
view.onChatRoomPresence(presence, {nick: 'dummy', name: 'lounge@localhost'}); view.onChatRoomPresence(presence, {nick: 'dummy', name: 'lounge@localhost'});
var $chat_content = view.$el.find('.chat-content'); expect(view.$('.chat-area').is(':visible')).toBeFalsy();
expect($chat_content.length).toBe(0); // There shouldn't be a chat content area anymore expect(view.$('.participants').is(':visible')).toBeFalsy();
var $chat_body = view.$el.find('.chat-body'); var $chat_body = view.$('.chat-body');
expect($chat_body.html().trim()).toBe('<p>You have been kicked from this room</p><p>The reason given is: "Avaunt, you cullion!"</p>'); expect($chat_body.html().trim().indexOf('<p>You have been kicked from this room</p><p>The reason given is: "Avaunt, you cullion!"</p>')).not.toBe(-1);
}, converse)); }, converse));
it("can be saved to, and retrieved from, browserStorage", $.proxy(function () { it("can be saved to, and retrieved from, browserStorage", $.proxy(function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment