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
3cc99374
Commit
3cc99374
authored
Aug 23, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests
parent
cf7d2fb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
18 deletions
+15
-18
spec/converse.js
spec/converse.js
+5
-5
spec/http-file-upload.js
spec/http-file-upload.js
+9
-8
spec/notification.js
spec/notification.js
+1
-5
No files found.
spec/converse.js
View file @
3cc99374
...
...
@@ -214,12 +214,12 @@
describe
(
"
The
\"
contacts
\"
API
"
,
function
()
{
it
(
"
has a method 'get' which returns wrapped contacts
"
,
mock
.
initConverse
(
async
(
done
,
_converse
)
=>
{
// Check that it returns nothing if a non-existing JID is given
test_utils
.
createContacts
(
_converse
,
'
current
'
);
// Hack to avoid having to fetch the roster again.
_converse
.
session
.
set
(
'
roster_fetched
'
,
true
);
it
(
"
has a method 'get' which returns wrapped contacts
"
,
mock
.
initConverse
(
null
,
[
'
emojisInitialized
'
],
{},
async
function
(
done
,
_converse
)
{
await
test_utils
.
waitForRoster
(
_converse
,
'
current
'
);
let
contact
=
await
_converse
.
api
.
contacts
.
get
(
'
non-existing@jabber.org
'
);
expect
(
contact
).
toBeFalsy
();
// Check when a single jid is given
...
...
spec/http-file-upload.js
View file @
3cc99374
...
...
@@ -170,14 +170,15 @@
describe
(
"
When not supported
"
,
function
()
{
describe
(
"
A file upload toolbar button
"
,
function
()
{
it
(
"
does not appear in private chats
"
,
mock
.
initConverse
(
async
(
done
,
_converse
)
=>
{
var
contact_jid
=
mock
.
cur_names
[
2
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@montague.lit
'
;
test_utils
.
createContacts
(
_converse
,
'
current
'
);
// Hack to avoid having to fetch the roster again.
_converse
.
session
.
set
(
'
roster_fetched
'
,
true
);
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
it
(
"
does not appear in private chats
"
,
mock
.
initConverse
(
null
,
[
'
emojisInitialized
'
],
{},
async
function
(
done
,
_converse
)
{
await
test_utils
.
waitForRoster
(
_converse
,
'
current
'
,
3
);
test_utils
.
openControlBox
();
const
contact_jid
=
mock
.
cur_names
[
0
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@montague.lit
'
;
await
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
await
test_utils
.
waitUntilDiscoConfirmed
(
_converse
,
_converse
.
domain
,
[{
'
category
'
:
'
server
'
,
'
type
'
:
'
IM
'
}],
...
...
spec/notification.js
View file @
3cc99374
...
...
@@ -19,11 +19,7 @@
null
,
[
'
rosterGroupsFetched
'
],
{},
async
(
done
,
_converse
)
=>
{
// TODO: not yet testing show_desktop_notifications setting
await
test_utils
.
createContacts
(
_converse
,
'
current
'
);
// Hack to avoid having to fetch the roster again.
_converse
.
session
.
set
(
'
roster_fetched
'
,
true
);
await
test_utils
.
waitForRoster
(
_converse
,
'
current
'
);
spyOn
(
_converse
,
'
showMessageNotification
'
).
and
.
callThrough
();
spyOn
(
_converse
,
'
areDesktopNotificationsEnabled
'
).
and
.
returnValue
(
true
);
spyOn
(
_converse
,
'
isMessageToHiddenChat
'
).
and
.
returnValue
(
true
);
...
...
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