Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f431bce2dc
@ -1,5 +1,5 @@
|
|||||||
define("transcripts", [
|
define("transcripts", [
|
||||||
"tpl!converse-logs/double_logins",
|
"tpl!../../converse-logs/missing_messages",
|
||||||
], function () {
|
], function () {
|
||||||
return arguments;
|
return arguments;
|
||||||
});
|
});
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
"jquery",
|
"jquery",
|
||||||
|
"jasmine",
|
||||||
"converse-core",
|
"converse-core",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils",
|
"test-utils",
|
||||||
"utils",
|
"utils",
|
||||||
"transcripts"
|
"transcripts"
|
||||||
], factory
|
], factory
|
||||||
);
|
);
|
||||||
} (this, function ($, converse, mock, test_utils, utils, transcripts) {
|
} (this, function ($, jasmine, converse, mock, test_utils, utils, transcripts) {
|
||||||
var Strophe = converse.env.Strophe;
|
var Strophe = converse.env.Strophe;
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
var IGNORED_TAGS = [
|
var IGNORED_TAGS = [
|
||||||
@ -48,18 +49,20 @@
|
|||||||
|
|
||||||
return describe("Transcripts of chat logs", function () {
|
return describe("Transcripts of chat logs", function () {
|
||||||
|
|
||||||
it("can be used to replay conversations", mock.initConverse(function (_converse) {
|
it("can be used to replay conversations",
|
||||||
/*
|
mock.initConverseWithPromises(
|
||||||
test_utils.openAndEnterChatRoom(_converse, "dummy", 'rooms.localhost', 'jc');
|
null, ['rosterGroupsFetched'], {},
|
||||||
test_utils.openAndEnterChatRoom(_converse, "prosody", 'conference.prosody.im', 'jc');
|
function (done, _converse) {
|
||||||
*/
|
|
||||||
test_utils.openAndEnterChatRoom(_converse, "discuss", 'conference.conversejs.org', 'jc');
|
_converse.allow_non_roster_messaging = true;
|
||||||
spyOn(_converse, 'areDesktopNotificationsEnabled').andReturn(true);
|
|
||||||
|
test_utils.openAndEnterChatRoom(_converse, 'discuss', 'conference.conversejs.org', 'dummy').then(function () {
|
||||||
|
spyOn(_converse, 'areDesktopNotificationsEnabled').and.returnValue(true);
|
||||||
_.each(transcripts, function (transcript) {
|
_.each(transcripts, function (transcript) {
|
||||||
var text = transcript();
|
var text = transcript();
|
||||||
var xml = Strophe.xmlHtmlNode(text);
|
var xml = Strophe.xmlHtmlNode(text);
|
||||||
$(xml).children('log').children('body').each(function (i, el) {
|
_.each(xml.firstElementChild.children, function (el) {
|
||||||
$(el).children().each(function (i, el) {
|
_.each(el.children, function (el) {
|
||||||
if (el.nodeType === 3) {
|
if (el.nodeType === 3) {
|
||||||
return; // Ignore text
|
return; // Ignore text
|
||||||
}
|
}
|
||||||
@ -71,6 +74,8 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
done();
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
@ -30,8 +30,8 @@ config.shim.jasmine = {
|
|||||||
require.config(config);
|
require.config(config);
|
||||||
|
|
||||||
var specs = [
|
var specs = [
|
||||||
//"spec/transcripts",
|
|
||||||
"jasmine",
|
"jasmine",
|
||||||
|
//"spec/transcripts",
|
||||||
"spec/profiling",
|
"spec/profiling",
|
||||||
"spec/utils",
|
"spec/utils",
|
||||||
"spec/converse",
|
"spec/converse",
|
||||||
|
Loading…
Reference in New Issue
Block a user