Selaa lähdekoodia

Fix tests.

Elements in chat rooms are now hidden, instead of removed. Update tests to
reflect this.
JC Brand 10 vuotta sitten
vanhempi
commit
7b6dfff99d
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      spec/chatroom.js

+ 4 - 4
spec/chatroom.js

@@ -259,10 +259,10 @@
 
                 var view = this.chatboxviews.get('lounge@localhost');
                 view.onChatRoomPresence(presence, {nick: 'dummy', name: 'lounge@localhost'});
-                var $chat_content = view.$el.find('.chat-content');
-                expect($chat_content.length).toBe(0); // There shouldn't be a chat content area anymore
-                var $chat_body = view.$el.find('.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(view.$('.chat-area').is(':visible')).toBeFalsy();
+                expect(view.$('.participants').is(':visible')).toBeFalsy();
+                var $chat_body = view.$('.chat-body');
+                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));
 
             it("can be saved to, and retrieved from, browserStorage", $.proxy(function () {