fixup
This commit is contained in:
parent
7df2d36e42
commit
bae06922fc
|
@ -8,6 +8,7 @@
|
|||
[jcbrand]
|
||||
- New non-core plugin `converse-roomslist`, which shows a list of open rooms
|
||||
in the `Rooms` tab of the control box. [jcbrand]
|
||||
- Show unread messages for minimized chat rooms. [jcbrand]
|
||||
- New configuration setting for `converse-bookmarks`:
|
||||
[hide_open_bookmarks](https://conversejs.org/docs/html/configurations.html#hide-open-bookmarks)
|
||||
It is meant to be set to `true` when using `converse-roomslist` so that open
|
||||
|
|
|
@ -121,5 +121,27 @@
|
|||
}).c('inactive', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree());
|
||||
expect(_converse.minimized_chats.toggleview.$('.unread-message-count').text()).toBe((i).toString());
|
||||
}));
|
||||
|
||||
it("shows the number messages received to minimized groupchats", mock.initConverse(function (_converse) {
|
||||
var room_jid = 'kitchen@conference.shakespeare.lit';
|
||||
test_utils.openAndEnterChatRoom(
|
||||
_converse, 'kitchen', 'conference.shakespeare.lit', 'fires');
|
||||
var view = _converse.chatboxviews.get(room_jid);
|
||||
view.model.set({'minimized': true});
|
||||
|
||||
var contact_jid = mock.cur_names[5].replace(/ /g,'.').toLowerCase() + '@localhost';
|
||||
var message = 'fires: Your attention is required';
|
||||
var nick = mock.chatroom_names[0],
|
||||
msg = $msg({
|
||||
from: room_jid+'/'+nick,
|
||||
id: (new Date()).getTime(),
|
||||
to: 'dummy@localhost',
|
||||
type: 'groupchat'
|
||||
}).c('body').t(message).tree();
|
||||
view.handleMUCMessage(msg);
|
||||
|
||||
expect(_converse.minimized_chats.toggleview.$('.unread-message-count').is(':visible')).toBeTruthy();
|
||||
expect(_converse.minimized_chats.toggleview.$('.unread-message-count').text()).toBe('1');
|
||||
}));
|
||||
});
|
||||
}));
|
||||
|
|
Loading…
Reference in New Issue
Block a user