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
4129c0ea
Commit
4129c0ea
authored
Sep 13, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing test
parent
020335c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
spec/chatroom.js
spec/chatroom.js
+9
-6
No files found.
spec/chatroom.js
View file @
4129c0ea
...
@@ -3172,7 +3172,6 @@
...
@@ -3172,7 +3172,6 @@
`<query xmlns="http://jabber.org/protocol/disco#info"/>`
+
`<query xmlns="http://jabber.org/protocol/disco#info"/>`
+
`</iq>`
);
`</iq>`
);
view
=
_converse
.
chatboxviews
.
get
(
'
coven@chat.shakespeare.lit
'
);
view
=
_converse
.
chatboxviews
.
get
(
'
coven@chat.shakespeare.lit
'
);
// State that the chat is members-only via the features IQ
// State that the chat is members-only via the features IQ
var
features_stanza
=
$iq
({
var
features_stanza
=
$iq
({
...
@@ -3288,16 +3287,20 @@
...
@@ -3288,16 +3287,20 @@
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
owner_list_stanza
));
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
owner_list_stanza
));
return
test_utils
.
waitUntil
(()
=>
IQ_ids
.
length
,
300
);
return
test_utils
.
waitUntil
(()
=>
IQ_ids
.
length
,
300
);
}).
then
(()
=>
{
}).
then
(()
=>
{
// Check that the member list now gets updated
return
test_utils
.
waitUntil
(()
=>
_
.
get
(
_
.
filter
(
var
iq
=
"
<iq to='coven@chat.shakespeare.lit' type='set' xmlns='jabber:client' id='
"
+
IQ_ids
.
pop
()
+
"
'>
"
+
IQ_stanzas
,
iq
=>
iq
.
nodeTree
.
querySelector
(
`iq[to="
${
room_jid
}
"] query[xmlns="http://jabber.org/protocol/muc#admin"]`
)).
pop
(),
'
nodeTree
'
));
}).
then
(
stanza
=>
{
expect
(
stanza
.
outerHTML
,
"
<iq to='coven@chat.shakespeare.lit' type='set' xmlns='jabber:client' id='
"
+
IQ_ids
.
pop
()
+
"
'>
"
+
"
<query xmlns='http://jabber.org/protocol/muc#admin'>
"
+
"
<query xmlns='http://jabber.org/protocol/muc#admin'>
"
+
"
<item affiliation='member' jid='
"
+
invitee_jid
+
"
'>
"
+
"
<item affiliation='member' jid='
"
+
invitee_jid
+
"
'>
"
+
"
<reason>Please join this groupchat</reason>
"
+
"
<reason>Please join this groupchat</reason>
"
+
"
</item>
"
+
"
</item>
"
+
"
</query>
"
+
"
</query>
"
+
"
</iq>
"
;
"
</iq>
"
);
return
test_utils
.
waitUntil
(()
=>
_
.
includes
(
_
.
invokeMap
(
sent_IQs
,
Object
.
prototype
.
toLocaleString
),
iq
),
300
);
}).
then
(()
=>
{
// Finally check that the user gets invited.
// Finally check that the user gets invited.
expect
(
sent_stanza
.
toLocaleString
()).
toBe
(
// Strophe adds the xmlns attr (although not in spec)
expect
(
sent_stanza
.
toLocaleString
()).
toBe
(
// Strophe adds the xmlns attr (although not in spec)
"
<message from='dummy@localhost/resource' to='
"
+
invitee_jid
+
"
' id='
"
+
sent_id
+
"
' xmlns='jabber:client'>
"
+
"
<message from='dummy@localhost/resource' to='
"
+
invitee_jid
+
"
' id='
"
+
sent_id
+
"
' xmlns='jabber:client'>
"
+
...
...
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