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
095606a8
Commit
095606a8
authored
May 16, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
roomslist: Add initial test spec for `converse-roomslist`.
parent
f636fa48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
spec/roomslist.js
spec/roomslist.js
+27
-0
tests/runner.js
tests/runner.js
+1
-0
No files found.
spec/roomslist.js
0 → 100644
View file @
095606a8
(
function
(
root
,
factory
)
{
define
([
"
mock
"
,
"
converse-core
"
,
"
converse-roomslist
"
,
"
test-utils
"
],
factory
);
}
(
this
,
function
(
mock
,
converse
,
roomslist
,
test_utils
)
{
var
_
=
converse
.
env
.
_
;
describe
(
"
The converse-roomslist plugin
"
,
function
()
{
it
(
"
shows a list of open rooms in the
\"
Rooms
\"
panel
"
,
mock
.
initConverse
(
{
whitelisted_plugins
:
[
'
converse-roomslist
'
],
allow_bookmarks
:
false
// Makes testing easier, otherwise we
// have to mock stanza traffic.
},
function
(
_converse
)
{
test_utils
.
openChatRoom
(
_converse
,
'
theplay
'
,
'
conference.shakespeare.lit
'
,
'
JC
'
);
expect
(
_
.
isUndefined
(
_converse
.
rooms_list_view
)).
toBeFalsy
();
var
room_els
=
_converse
.
rooms_list_view
.
el
.
querySelectorAll
(
"
.open-room
"
);
expect
(
room_els
.
length
).
toBe
(
1
);
test_utils
.
openChatRoom
(
_converse
,
'
lounge
'
,
'
localhost
'
,
'
dummy
'
);
room_els
=
_converse
.
rooms_list_view
.
el
.
querySelectorAll
(
"
.open-room
"
);
expect
(
room_els
.
length
).
toBe
(
2
);
}
));
});
}));
tests/runner.js
View file @
095606a8
...
...
@@ -54,6 +54,7 @@ var specs = [
"
spec/utils
"
,
"
spec/converse
"
,
"
spec/bookmarks
"
,
"
spec/roomslist
"
,
"
spec/headline
"
,
"
spec/disco
"
,
"
spec/protocol
"
,
...
...
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