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
cc28f7e8
Commit
cc28f7e8
authored
May 11, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test to check that moderators are highlighted
parent
6d9fe68a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
spec/ChatRoomSpec.js
spec/ChatRoomSpec.js
+16
-1
No files found.
spec/ChatRoomSpec.js
View file @
cc28f7e8
...
...
@@ -29,7 +29,8 @@
var
chatroomview
=
this
.
chatboxesview
.
views
[
'
lounge@muc.localhost
'
];
var
$participant_list
=
chatroomview
.
$el
.
find
(
'
.participant-list
'
);
var
roster
=
{},
room
=
{},
i
;
for
(
i
=
0
;
i
<
chatroom_names
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
chatroom_names
.
length
-
1
;
i
++
)
{
roster
[
chatroom_names
[
i
]]
=
{};
chatroomview
.
onChatRoomRoster
(
roster
,
room
);
expect
(
$participant_list
.
find
(
'
li
'
).
length
).
toBe
(
1
+
i
);
...
...
@@ -39,6 +40,20 @@
chatroomview
.
onChatRoomRoster
(
roster
,
room
);
},
converse
));
it
(
"
indicates moderators by means of a special css class and tooltip
"
,
$
.
proxy
(
function
()
{
var
chatroomview
=
this
.
chatboxesview
.
views
[
'
lounge@muc.localhost
'
];
var
$participant_list
=
chatroomview
.
$el
.
find
(
'
.participant-list
'
);
var
roster
=
{},
idx
=
chatroom_names
.
length
-
1
;
roster
[
chatroom_names
[
idx
]]
=
{};
roster
[
chatroom_names
[
idx
]].
role
=
'
moderator
'
;
chatroomview
.
onChatRoomRoster
(
roster
,
{});
occupant
=
$participant_list
.
find
(
'
li
'
);
expect
(
occupant
.
length
).
toBe
(
1
);
expect
(
$
(
occupant
).
text
()).
toBe
(
chatroom_names
[
idx
]);
expect
(
$
(
occupant
).
attr
(
'
class
'
)).
toBe
(
'
moderator
'
);
expect
(
$
(
occupant
).
attr
(
'
title
'
)).
toBe
(
'
This user is a moderator
'
);
},
converse
));
it
(
"
can be saved to, and retrieved from, localStorage
"
,
$
.
proxy
(
function
()
{
// We instantiate a new ChatBoxes collection, which by default
// will be empty.
...
...
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