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
fc941270
Commit
fc941270
authored
Dec 03, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests
parent
393bbe02
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
475 additions
and
410 deletions
+475
-410
spec/chatbox.js
spec/chatbox.js
+161
-130
spec/chatroom.js
spec/chatroom.js
+10
-2
spec/protocol.js
spec/protocol.js
+283
-277
tests/utils.js
tests/utils.js
+21
-1
No files found.
spec/chatbox.js
View file @
fc941270
This diff is collapsed.
Click to expand it.
spec/chatroom.js
View file @
fc941270
...
...
@@ -546,8 +546,16 @@
null
,
[
'
rosterGroupsFetched
'
],
{},
function
(
done
,
_converse
)
{
test_utils
.
createContacts
(
_converse
,
'
current
'
);
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
lounge
'
,
'
localhost
'
,
'
dummy
'
).
then
(
function
()
{
test_utils
.
waitUntilFeatureSupportConfirmed
(
_converse
,
'
vcard-temp
'
)
.
then
(
function
()
{
return
test_utils
.
waitUntil
(
function
()
{
return
_converse
.
xmppstatus
.
get
(
'
fullname
'
);
},
300
);
}).
then
(
function
()
{
test_utils
.
createContacts
(
_converse
,
'
current
'
);
return
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
lounge
'
,
'
localhost
'
,
'
dummy
'
);
}).
then
(
function
()
{
var
view
=
_converse
.
chatboxviews
.
get
(
'
lounge@localhost
'
);
if
(
!
view
.
$el
.
find
(
'
.chat-area
'
).
length
)
{
view
.
renderChatArea
();
}
var
message
=
'
/me is tired
'
;
...
...
spec/protocol.js
View file @
fc941270
This diff is collapsed.
Click to expand it.
tests/utils.js
View file @
fc941270
...
...
@@ -11,7 +11,27 @@
if
(
typeof
window
.
Promise
===
'
undefined
'
)
{
waitUntilPromise
.
setPromiseImplementation
(
Promise
);
}
utils
.
waitUntil
=
waitUntilPromise
[
'
default
'
];
utils
.
waitUntil
=
waitUntilPromise
.
default
;
utils
.
waitUntilFeatureSupportConfirmed
=
function
(
_converse
,
feature_name
)
{
var
IQ_disco
,
stanza
;
return
utils
.
waitUntil
(
function
()
{
IQ_disco
=
_
.
filter
(
_converse
.
connection
.
IQ_stanzas
,
function
(
iq
)
{
return
iq
.
nodeTree
.
querySelector
(
'
query[xmlns="http://jabber.org/protocol/disco#info"]
'
);
}).
pop
();
return
!
_
.
isUndefined
(
IQ_disco
);
},
300
).
then
(
function
()
{
var
info_IQ_id
=
IQ_disco
.
nodeTree
.
getAttribute
(
'
id
'
);
stanza
=
$iq
({
'
type
'
:
'
result
'
,
'
from
'
:
'
localhost
'
,
'
to
'
:
'
dummy@localhost/resource
'
,
'
id
'
:
info_IQ_id
}).
c
(
'
query
'
,
{
'
xmlns
'
:
'
http://jabber.org/protocol/disco#info
'
})
.
c
(
'
feature
'
,
{
'
var
'
:
feature_name
});
_converse
.
connection
.
_dataRecv
(
utils
.
createRequest
(
stanza
));
});
}
utils
.
createRequest
=
function
(
iq
)
{
iq
=
typeof
iq
.
tree
==
"
function
"
?
iq
.
tree
()
:
iq
;
...
...
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