Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
ebc8d243
Commit
ebc8d243
authored
May 24, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
roomslist: also test that indicators are removed upon maximization
parent
c83026e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
CHANGES.md
CHANGES.md
+1
-1
spec/roomslist.js
spec/roomslist.js
+18
-1
No files found.
CHANGES.md
View file @
ebc8d243
...
...
@@ -8,7 +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
room
s. [jcbrand]
-
Show unread messages for minimized chats. [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
...
...
spec/roomslist.js
View file @
ebc8d243
...
...
@@ -89,7 +89,6 @@
var
view
=
_converse
.
chatboxviews
.
get
(
room_jid
);
view
.
model
.
set
({
'
minimized
'
:
true
});
var
contact_jid
=
mock
.
cur_names
[
5
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@localhost
'
;
var
nick
=
mock
.
chatroom_names
[
0
];
view
.
handleMUCMessage
(
...
...
@@ -115,6 +114,24 @@
);
var
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicactor
"
);
expect
(
indicator_el
.
textContent
).
toBe
(
'
1
'
);
view
.
handleMUCMessage
(
$msg
({
from
:
room_jid
+
'
/
'
+
nick
,
id
:
(
new
Date
()).
getTime
(),
to
:
'
dummy@localhost
'
,
type
:
'
groupchat
'
}).
c
(
'
body
'
).
t
(
'
romeo: and another thing...
'
).
tree
()
);
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicactor
"
);
expect
(
indicator_el
.
textContent
).
toBe
(
'
2
'
);
// When the chat gets maximized again, the unread indicators are removed
view
.
model
.
set
({
'
minimized
'
:
false
});
indicator_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.msgs-indicactor
"
);
expect
(
_
.
isNull
(
indicator_el
));
room_el
=
_converse
.
rooms_list_view
.
el
.
querySelector
(
"
.available-chatroom
"
);
expect
(
_
.
includes
(
room_el
.
classList
,
'
unread-msgs
'
)).
toBeFalsy
();
}));
});
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment