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
4361d0d6
Commit
4361d0d6
authored
Jun 30, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests due to time tag
parent
40272351
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
spec/chatroom.js
spec/chatroom.js
+4
-4
spec/messages.js
spec/messages.js
+3
-3
No files found.
spec/chatroom.js
View file @
4361d0d6
...
...
@@ -714,8 +714,8 @@
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
presence
));
var
$time
=
$chat_content
.
find
(
'
time
'
);
expect
(
$
time
.
length
).
toEqual
(
4
);
let
time
=
chat_content
.
querySelectorAll
(
'
time.separator-text
'
);
expect
(
time
.
length
).
toEqual
(
4
);
var
$indicator
=
$chat_content
.
find
(
'
.date-separator:eq(3)
'
);
expect
(
$indicator
.
attr
(
'
class
'
)).
toEqual
(
'
message date-separator
'
);
...
...
@@ -753,8 +753,8 @@
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
presence
));
$time
=
$chat_content
.
find
(
'
time
'
);
expect
(
$
time
.
length
).
toEqual
(
6
);
time
=
chat_content
.
querySelectorAll
(
'
time.separator-text
'
);
expect
(
time
.
length
).
toEqual
(
6
);
$indicator
=
$chat_content
.
find
(
'
.date-separator:eq(5)
'
);
expect
(
$indicator
.
attr
(
'
class
'
)).
toEqual
(
'
message date-separator
'
);
...
...
spec/messages.js
View file @
4361d0d6
...
...
@@ -577,7 +577,7 @@
expect
(
$el
.
hasClass
(
'
chat-msg-followup
'
)).
toBe
(
false
);
expect
(
$el
.
text
()).
toEqual
(
'
Older message
'
);
$time
=
$chat_content
.
find
(
'
time:eq(1)
'
);
$time
=
$chat_content
.
find
(
'
time
.separator-text
:eq(1)
'
);
expect
(
$time
.
text
()).
toEqual
(
"
Monday Jan 1st 2018
"
);
$day
=
$chat_content
.
find
(
'
.date-separator:eq(1)
'
);
...
...
@@ -591,7 +591,7 @@
expect
(
$el
.
find
(
'
.chat-msg-text
'
).
text
()).
toEqual
(
'
another inbetween message
'
);
expect
(
$el
.
hasClass
(
'
chat-msg-followup
'
)).
toBe
(
true
);
$time
=
$chat_content
.
find
(
'
time:nth(2)
'
);
$time
=
$chat_content
.
find
(
'
time
.separator-text
:nth(2)
'
);
expect
(
$time
.
text
()).
toEqual
(
"
Tuesday Jan 2nd 2018
"
);
$day
=
$chat_content
.
find
(
'
.date-separator:nth(2)
'
);
...
...
@@ -928,7 +928,7 @@
expect
(
_converse
.
emit
).
toHaveBeenCalledWith
(
'
message
'
,
jasmine
.
any
(
Object
));
// Check that there is a <time> element, with the required
// props.
expect
(
$chat_content
[
0
].
querySelectorAll
(
'
time
'
).
length
).
toEqual
(
2
);
// There are now two time elements
expect
(
$chat_content
[
0
].
querySelectorAll
(
'
time
.separator-text
'
).
length
).
toEqual
(
2
);
// There are now two time elements
var
message_date
=
new
Date
();
$day
=
$chat_content
.
find
(
'
.date-separator:last
'
);
...
...
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