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 @@
...
@@ -214,12 +214,12 @@
describe
(
"
The
\"
contacts
\"
API
"
,
function
()
{
describe
(
"
The
\"
contacts
\"
API
"
,
function
()
{
it
(
"
has a method 'get' which returns wrapped contacts
"
,
mock
.
initConverse
(
async
(
done
,
_converse
)
=>
{
it
(
"
has a method 'get' which returns wrapped contacts
"
,
// Check that it returns nothing if a non-existing JID is given
mock
.
initConverse
(
test_utils
.
createContacts
(
_converse
,
'
current
'
);
null
,
[
'
emojisInitialized
'
],
{},
// Hack to avoid having to fetch the roster again.
async
function
(
done
,
_converse
)
{
_converse
.
session
.
set
(
'
roster_fetched
'
,
true
);
await
test_utils
.
waitForRoster
(
_converse
,
'
current
'
);
let
contact
=
await
_converse
.
api
.
contacts
.
get
(
'
non-existing@jabber.org
'
);
let
contact
=
await
_converse
.
api
.
contacts
.
get
(
'
non-existing@jabber.org
'
);
expect
(
contact
).
toBeFalsy
();
expect
(
contact
).
toBeFalsy
();
// Check when a single jid is given
// Check when a single jid is given
...
...
spec/http-file-upload.js
View file @
3cc99374
...
@@ -170,14 +170,15 @@
...
@@ -170,14 +170,15 @@
describe
(
"
When not supported
"
,
function
()
{
describe
(
"
When not supported
"
,
function
()
{
describe
(
"
A file upload toolbar button
"
,
function
()
{
describe
(
"
A file upload toolbar button
"
,
function
()
{
it
(
"
does not appear in private chats
"
,
mock
.
initConverse
(
async
(
done
,
_converse
)
=>
{
it
(
"
does not appear in private chats
"
,
var
contact_jid
=
mock
.
cur_names
[
2
].
replace
(
/ /g
,
'
.
'
).
toLowerCase
()
+
'
@montague.lit
'
;
mock
.
initConverse
(
test_utils
.
createContacts
(
_converse
,
'
current
'
);
null
,
[
'
emojisInitialized
'
],
{},
// Hack to avoid having to fetch the roster again.
async
function
(
done
,
_converse
)
{
_converse
.
session
.
set
(
'
roster_fetched
'
,
true
);
await
test_utils
.
waitForRoster
(
_converse
,
'
current
'
,
3
);
test_utils
.
openChatBoxFor
(
_converse
,
contact_jid
);
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
(
await
test_utils
.
waitUntilDiscoConfirmed
(
_converse
,
_converse
.
domain
,
_converse
,
_converse
.
domain
,
[{
'
category
'
:
'
server
'
,
'
type
'
:
'
IM
'
}],
[{
'
category
'
:
'
server
'
,
'
type
'
:
'
IM
'
}],
...
...
spec/notification.js
View file @
3cc99374
...
@@ -19,11 +19,7 @@
...
@@ -19,11 +19,7 @@
null
,
[
'
rosterGroupsFetched
'
],
{},
null
,
[
'
rosterGroupsFetched
'
],
{},
async
(
done
,
_converse
)
=>
{
async
(
done
,
_converse
)
=>
{
// TODO: not yet testing show_desktop_notifications setting
await
test_utils
.
waitForRoster
(
_converse
,
'
current
'
);
await
test_utils
.
createContacts
(
_converse
,
'
current
'
);
// Hack to avoid having to fetch the roster again.
_converse
.
session
.
set
(
'
roster_fetched
'
,
true
);
spyOn
(
_converse
,
'
showMessageNotification
'
).
and
.
callThrough
();
spyOn
(
_converse
,
'
showMessageNotification
'
).
and
.
callThrough
();
spyOn
(
_converse
,
'
areDesktopNotificationsEnabled
'
).
and
.
returnValue
(
true
);
spyOn
(
_converse
,
'
areDesktopNotificationsEnabled
'
).
and
.
returnValue
(
true
);
spyOn
(
_converse
,
'
isMessageToHiddenChat
'
).
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