Fix tests by depending on jquery obj.
Also fixed groupchat test by getting and including correct msg id.
This commit is contained in:
parent
a88c786991
commit
4a89d28e38
@ -29,7 +29,7 @@
|
|||||||
"bootstrap": "~3.2.0",
|
"bootstrap": "~3.2.0",
|
||||||
"bootstrapJS": "https://raw.githubusercontent.com/jcbrand/bootstrap/7d96a5f60d26c67b5348b270a775518b96a702c8/dist/js/bootstrap.js",
|
"bootstrapJS": "https://raw.githubusercontent.com/jcbrand/bootstrap/7d96a5f60d26c67b5348b270a775518b96a702c8/dist/js/bootstrap.js",
|
||||||
"fontawesome": "~4.1.0",
|
"fontawesome": "~4.1.0",
|
||||||
"typeahead.js": "https://raw.githubusercontent.com/jcbrand/typeahead.js/eedfb10505dd3a20123d1fafc07c1352d83f0ab3/dist/typeahead.jquery.js"
|
"typeahead.js": "https://raw.githubusercontent.com/jcbrand/typeahead.js/eedfb10505dd3a20123d1fafc07c1352d83f0ab3/dist/typeahead.jquery.js",
|
||||||
"strophejs-plugins": "~0.0.4"
|
"strophejs-plugins": "~0.0.4"
|
||||||
},
|
},
|
||||||
"exportsOverride": {}
|
"exportsOverride": {}
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
|
"jquery",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils"
|
"test_utils"
|
||||||
], function (mock, test_utils) {
|
], function ($, mock, test_utils) {
|
||||||
return factory(mock, test_utils);
|
return factory($, mock, test_utils);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} (this, function (mock, test_utils) {
|
} (this, function ($, mock, test_utils) {
|
||||||
return describe("Chatboxes", $.proxy(function(mock, test_utils) {
|
return describe("Chatboxes", $.proxy(function(mock, test_utils) {
|
||||||
describe("A Chatbox", $.proxy(function () {
|
describe("A Chatbox", $.proxy(function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
|
"jquery",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils"
|
"test_utils"
|
||||||
], function (mock, test_utils) {
|
], function ($, mock, test_utils) {
|
||||||
return factory(mock, test_utils);
|
return factory($, mock, test_utils);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} (this, function (mock, test_utils) {
|
} (this, function ($, mock, test_utils) {
|
||||||
return describe("ChatRooms", $.proxy(function (mock, test_utils) {
|
return describe("ChatRooms", $.proxy(function (mock, test_utils) {
|
||||||
describe("A Chat Room", $.proxy(function () {
|
describe("A Chat Room", $.proxy(function () {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
@ -139,9 +140,9 @@
|
|||||||
|
|
||||||
var message = $msg({
|
var message = $msg({
|
||||||
from: 'lounge@localhost/dummy',
|
from: 'lounge@localhost/dummy',
|
||||||
id: '2',
|
|
||||||
to: 'dummy@localhost.com',
|
to: 'dummy@localhost.com',
|
||||||
type: 'groupchat'
|
type: 'groupchat',
|
||||||
|
id: view.model.messages.at(0).get('msgid')
|
||||||
}).c('body').t(text);
|
}).c('body').t(text);
|
||||||
view.onChatRoomMessage(message.nodeTree);
|
view.onChatRoomMessage(message.nodeTree);
|
||||||
var $chat_content = view.$el.find('.chat-content');
|
var $chat_content = view.$el.find('.chat-content');
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
|
"jquery",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils"
|
"test_utils"
|
||||||
], function (mock, test_utils) {
|
], function ($, mock, test_utils) {
|
||||||
return factory(mock, test_utils);
|
return factory($, mock, test_utils);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} (this, function (mock, test_utils) {
|
} (this, function ($, mock, test_utils) {
|
||||||
|
|
||||||
var checkHeaderToggling = function ($header) {
|
var checkHeaderToggling = function ($header) {
|
||||||
var $toggle = $header.find('a.group-toggle');
|
var $toggle = $header.find('a.group-toggle');
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
|
"jquery",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils"
|
"test_utils"
|
||||||
], function (mock, test_utils) {
|
], function ($, mock, test_utils) {
|
||||||
return factory(mock, test_utils);
|
return factory($, mock, test_utils);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} (this, function (mock, test_utils) {
|
} (this, function ($, mock, test_utils) {
|
||||||
return describe("Converse", $.proxy(function(mock, test_utils) {
|
return describe("Converse", $.proxy(function(mock, test_utils) {
|
||||||
|
|
||||||
beforeEach($.proxy(function () {
|
beforeEach($.proxy(function () {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
|
"jquery",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils"
|
"test_utils"
|
||||||
], function (mock, test_utils) {
|
], function ($, mock, test_utils) {
|
||||||
return factory(mock, test_utils);
|
return factory($, mock, test_utils);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} (this, function (mock, test_utils) {
|
} (this, function ($, mock, test_utils) {
|
||||||
return describe("The Converse Event Emitter", $.proxy(function(mock, test_utils) {
|
return describe("The Converse Event Emitter", $.proxy(function(mock, test_utils) {
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
window.sessionStorage.clear();
|
window.sessionStorage.clear();
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
|
"jquery",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils"
|
"test_utils"
|
||||||
], function (mock, test_utils) {
|
], function ($, mock, test_utils) {
|
||||||
return factory(mock, test_utils);
|
return factory($, mock, test_utils);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} (this, function (mock, test_utils) {
|
} (this, function ($, mock, test_utils) {
|
||||||
return describe("The Minimized Chats Widget", $.proxy(function(mock, test_utils) {
|
return describe("The Minimized Chats Widget", $.proxy(function(mock, test_utils) {
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
runs(function () {
|
runs(function () {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
|
"jquery",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils"
|
"test_utils"
|
||||||
], function (mock, test_utils) {
|
], function ($, mock, test_utils) {
|
||||||
return factory(mock, test_utils);
|
return factory($, mock, test_utils);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} (this, function (mock, test_utils) {
|
} (this, function ($, mock, test_utils) {
|
||||||
return describe("The OTR module", $.proxy(function(mock, test_utils) {
|
return describe("The OTR module", $.proxy(function(mock, test_utils) {
|
||||||
|
|
||||||
beforeEach($.proxy(function () {
|
beforeEach($.proxy(function () {
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
'join': function () {},
|
'join': function () {},
|
||||||
'leave': function () {},
|
'leave': function () {},
|
||||||
'rooms': {},
|
'rooms': {},
|
||||||
'groupchat': function () {}
|
'groupchat': function () {return String((new Date()).getTime()); }
|
||||||
},
|
},
|
||||||
'service': 'jasmine tests',
|
'service': 'jasmine tests',
|
||||||
'jid': 'dummy@localhost',
|
'jid': 'dummy@localhost',
|
||||||
|
Loading…
Reference in New Issue
Block a user