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
f283f6bc
Commit
f283f6bc
authored
Feb 01, 2015
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing tests after introducing AMD version of Strophe
parent
5a253e32
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
53 deletions
+30
-53
converse.js
converse.js
+7
-1
spec/chatbox.js
spec/chatbox.js
+3
-0
spec/chatroom.js
spec/chatroom.js
+3
-0
spec/controlbox.js
spec/controlbox.js
+2
-0
spec/converse.js
spec/converse.js
+2
-1
spec/minchats.js
spec/minchats.js
+2
-0
spec/otr.js
spec/otr.js
+2
-0
spec/profiling.js
spec/profiling.js
+2
-0
spec/register.js
spec/register.js
+2
-0
tests/mock.js
tests/mock.js
+4
-51
tests/utils.js
tests/utils.js
+1
-0
No files found.
converse.js
View file @
f283f6bc
...
...
@@ -23,6 +23,7 @@
var
$iq
=
dependencies
.
$iq
;
var
$msg
=
dependencies
.
$msg
;
var
$pres
=
dependencies
.
$pres
;
var
$build
=
dependencies
.
$build
;
var
DSA
=
dependencies
.
otr
?
dependencies
.
otr
.
DSA
:
undefined
;
var
OTR
=
dependencies
.
otr
?
dependencies
.
otr
.
OTR
:
undefined
;
var
Strophe
=
dependencies
.
Strophe
;
...
...
@@ -5280,7 +5281,12 @@
'
env
'
:
{
'
jQuery
'
:
$
,
'
Strophe
'
:
Strophe
,
// TODO: this must be wrapped
'
_
'
:
_
'
$build
'
:
$build
,
'
$iq
'
:
$iq
,
'
$pres
'
:
$pres
,
'
$msg
'
:
$msg
,
'
_
'
:
_
,
'
b64_sha1
'
:
b64_sha1
},
// Deprecated API methods
...
...
spec/chatbox.js
View file @
f283f6bc
...
...
@@ -8,6 +8,9 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
var
$msg
=
converse_api
.
env
.
$msg
;
var
Strophe
=
converse_api
.
env
.
Strophe
;
return
describe
(
"
Chatboxes
"
,
$
.
proxy
(
function
(
mock
,
test_utils
)
{
describe
(
"
A Chatbox
"
,
$
.
proxy
(
function
()
{
beforeEach
(
function
()
{
...
...
spec/chatroom.js
View file @
f283f6bc
...
...
@@ -8,6 +8,9 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
var
$pres
=
converse_api
.
env
.
$pres
;
var
$msg
=
converse_api
.
env
.
$msg
;
return
describe
(
"
ChatRooms
"
,
$
.
proxy
(
function
(
mock
,
test_utils
)
{
describe
(
"
A Chat Room
"
,
$
.
proxy
(
function
()
{
beforeEach
(
function
()
{
...
...
spec/controlbox.js
View file @
f283f6bc
...
...
@@ -8,6 +8,8 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
var
$pres
=
converse_api
.
env
.
$pres
;
var
$iq
=
converse_api
.
env
.
$iq
;
var
checkHeaderToggling
=
function
(
$header
)
{
var
$toggle
=
$header
.
find
(
'
a.group-toggle
'
);
...
...
spec/converse.js
View file @
f283f6bc
...
...
@@ -8,8 +8,9 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
return
describe
(
"
Converse
"
,
$
.
proxy
(
function
(
mock
,
test_utils
)
{
var
b64_sha1
=
converse_api
.
env
.
b64_sha1
;
return
describe
(
"
Converse
"
,
$
.
proxy
(
function
(
mock
,
test_utils
)
{
describe
(
"
The
\"
tokens
\"
API
"
,
$
.
proxy
(
function
()
{
beforeEach
(
$
.
proxy
(
function
()
{
test_utils
.
closeAllChatBoxes
();
...
...
spec/minchats.js
View file @
f283f6bc
...
...
@@ -8,6 +8,8 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
var
$msg
=
converse_api
.
env
.
$msg
;
return
describe
(
"
The Minimized Chats Widget
"
,
$
.
proxy
(
function
(
mock
,
test_utils
)
{
beforeEach
(
function
()
{
runs
(
function
()
{
...
...
spec/otr.js
View file @
f283f6bc
...
...
@@ -8,6 +8,8 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
var
b64_sha1
=
converse_api
.
env
.
b64_sha1
;
return
describe
(
"
The OTR module
"
,
$
.
proxy
(
function
(
mock
,
test_utils
)
{
beforeEach
(
$
.
proxy
(
function
()
{
...
...
spec/profiling.js
View file @
f283f6bc
...
...
@@ -8,6 +8,8 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
var
Strophe
=
converse_api
.
env
.
Strophe
;
describe
(
"
Profiling
"
,
function
()
{
beforeEach
(
function
()
{
converse
.
connection
.
roster
.
items
=
[];
...
...
spec/register.js
View file @
f283f6bc
...
...
@@ -8,6 +8,8 @@
}
);
}
(
this
,
function
(
$
,
mock
,
test_utils
)
{
var
Strophe
=
converse_api
.
env
.
Strophe
;
var
$iq
=
converse_api
.
env
.
$iq
;
describe
(
"
The Registration Panel
"
,
$
.
proxy
(
function
(
mock
,
test_utils
)
{
beforeEach
(
function
()
{
...
...
tests/mock.js
View file @
f283f6bc
(
function
(
root
,
factory
)
{
define
(
"
mock
"
,
[
'
converse
'
],
function
()
{
return
factory
();
function
(
converse
)
{
return
factory
(
converse
);
});
}(
this
,
function
(
converse
)
{
var
Strophe
=
converse
.
env
.
Strophe
;
var
$iq
=
converse
.
env
.
$iq
;
var
mock
=
{};
// Names from http://www.fakenamegenerator.com/
mock
.
req_names
=
[
...
...
@@ -64,54 +66,5 @@
c
.
attach
(
c
.
jid
);
return
c
;
}();
/*
{
'muc': {
'listRooms': function () {},
'join': function () {},
'leave': function () {},
'rooms': {},
'groupchat': function () {return String((new Date()).getTime()); }
},
'service': 'jasmine tests',
'addHandler': function (handler, ns, name, type, id, from, options) {
return function () {};
},
'send': function () {},
'roster': {
'add': function () {},
'authorize': function () {},
'unauthorize': function () {},
'get': function () {},
'subscribe': function () {},
'registerCallback': function () {},
'remove': function (jid, callback) { callback(); }
},
'vcard': {
'get': function (callback, jid) {
var fullname;
if (!jid) {
jid = 'dummy@localhost';
fullname = 'Max Mustermann' ;
} else {
var name = jid.split('@')[0].replace(/\./g, ' ').split(' ');
var last = name.length-1;
name[0] = name[0].charAt(0).toUpperCase()+name[0].slice(1);
name[last] = name[last].charAt(0).toUpperCase()+name[last].slice(1);
fullname = name.join(' ');
}
var vcard = $iq().c('vCard').c('FN').t(fullname);
callback(vcard.tree());
}
},
'disco': {
'addFeature': function () {},
'addIdentity': function () {},
'info': function () {},
'items': function () {}
}
};
*/
return
mock
;
}));
tests/utils.js
View file @
f283f6bc
...
...
@@ -7,6 +7,7 @@
return
factory
(
$
,
mock
);
});
}(
this
,
function
(
$
,
mock
)
{
var
Strophe
=
converse_api
.
env
.
Strophe
;
var
utils
=
{};
utils
.
createRequest
=
function
(
iq
)
{
...
...
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