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
5406e973
Commit
5406e973
authored
Aug 25, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trying to fix timing issue on Travis
parent
9e240c56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
spec/chatroom.js
spec/chatroom.js
+12
-10
No files found.
spec/chatroom.js
View file @
5406e973
...
...
@@ -3483,14 +3483,15 @@
null
,
[
'
rosterGroupsFetched
'
],
{},
function
(
done
,
_converse
)
{
let
view
;
const
room_jid
=
'
coven@chat.shakespeare.lit
'
;
test_utils
.
openAndEnterChatRoom
(
_converse
,
'
coven
'
,
'
chat.shakespeare.lit
'
,
'
some1
'
).
then
(
function
()
{
var
room_jid
=
'
coven@chat.shakespeare.lit
'
;
var
view
=
_converse
.
chatboxviews
.
get
(
'
coven@chat.shakespeare.lit
'
);
var
$chat_content
=
$
(
view
.
el
).
find
(
'
.chat-content
'
);
view
=
_converse
.
chatboxviews
.
get
(
'
coven@chat.shakespeare.lit
'
);
const
chat_content
=
view
.
el
.
querySelector
(
'
.chat-content
'
);
expect
(
$
chat_content
.
find
(
'
div.chat-info:first
'
).
html
()).
toBe
(
"
some1 has entered the groupchat
"
);
expect
(
$
(
chat_content
)
.
find
(
'
div.chat-info:first
'
).
html
()).
toBe
(
"
some1 has entered the groupchat
"
);
let
presence
=
$pres
({
to
:
'
dummy@localhost/_converse.js-29092160
'
,
...
...
@@ -3503,8 +3504,8 @@
'
role
'
:
'
participant
'
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
presence
));
expect
(
$chat_content
[
0
]
.
querySelectorAll
(
'
div.chat-info
'
).
length
).
toBe
(
2
);
expect
(
$
chat_content
.
find
(
'
div.chat-info:last
'
).
html
()).
toBe
(
"
newguy has entered the groupchat
"
);
expect
(
chat_content
.
querySelectorAll
(
'
div.chat-info
'
).
length
).
toBe
(
2
);
expect
(
$
(
chat_content
)
.
find
(
'
div.chat-info:last
'
).
html
()).
toBe
(
"
newguy has entered the groupchat
"
);
presence
=
$pres
({
to
:
'
dummy@localhost/_converse.js-29092160
'
,
...
...
@@ -3517,8 +3518,8 @@
'
role
'
:
'
participant
'
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
presence
));
expect
(
$chat_content
[
0
]
.
querySelectorAll
(
'
div.chat-info
'
).
length
).
toBe
(
3
);
expect
(
$
chat_content
.
find
(
'
div.chat-info:last
'
).
html
()).
toBe
(
"
nomorenicks has entered the groupchat
"
);
expect
(
chat_content
.
querySelectorAll
(
'
div.chat-info
'
).
length
).
toBe
(
3
);
expect
(
$
(
chat_content
)
.
find
(
'
div.chat-info:last
'
).
html
()).
toBe
(
"
nomorenicks has entered the groupchat
"
);
// See XEP-0085 http://xmpp.org/extensions/xep-0085.html#definitions
...
...
@@ -3531,7 +3532,8 @@
}).
c
(
'
body
'
).
c
(
'
composing
'
,
{
'
xmlns
'
:
Strophe
.
NS
.
CHATSTATES
}).
tree
();
view
.
model
.
onMessage
(
msg
);
return
test_utils
.
waitUntil
(()
=>
view
.
el
.
querySelectorAll
(
'
.chat-state-notification
'
).
length
);
}).
then
(()
=>
{
// Check that the notification appears inside the chatbox in the DOM
var
events
=
view
.
el
.
querySelectorAll
(
'
.chat-event
'
);
expect
(
events
.
length
).
toBe
(
3
);
...
...
@@ -3549,7 +3551,7 @@
});
// Check that it doesn't appear twice
msg
=
$msg
({
let
msg
=
$msg
({
from
:
room_jid
+
'
/newguy
'
,
id
:
(
new
Date
()).
getTime
(),
to
:
'
dummy@localhost
'
,
...
...
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