Fix the live mockup again (and move to mockup.html)

This commit is contained in:
JC Brand 2016-03-21 09:58:44 +00:00
parent 2d846961c2
commit 7b4fe90286
3 changed files with 23 additions and 9 deletions

View File

@ -7,8 +7,8 @@
<link rel="stylesheet" type="text/css" href="../components/jasmine/src/html/jasmine.css">
<link type="text/css" rel="stylesheet" media="screen" href="../css/theme.css" />
<link type="text/css" rel="stylesheet" media="screen" href="../css/converse.css" />
<script src="../main.js"></script>
<script data-main="main" src="../components/requirejs/require.js"></script>
<script src="converse.js"></script>
<script data-main="mockup/main" src="components/requirejs/require.js"></script>
</head>
<body>

View File

@ -1,5 +1,4 @@
// Extra test dependencies
config.baseUrl = '../';
config.paths.mock = "tests/mock";
config.paths.test_utils = "tests/utils";
config.paths.jasmine = "components/jasmine/lib/jasmine-core/jasmine";

View File

@ -38,7 +38,27 @@
view.onChatRoomMessage(message.nodeTree);
});
it("Show a private chat box", function () {
it("Show the control box", function () {
test_utils.openControlBox();
test_utils.openContactsPanel();
});
it("Show a headlines box", function () {
converse.connection._dataRecv(
test_utils.createRequest(
$msg({
'type': 'headline',
'from': 'notify.example.com',
'to': 'dummy@localhost',
'xml:lang': 'en'
})
.c('subject').t('MAIL').up()
.c('body').t('You got mail.').up()
)
);
});
xit("Show a private chat box", function () {
var contact_jid = mock.cur_names[2].replace(/ /g,'.').toLowerCase() + '@localhost';
var chatbox = test_utils.openChatBoxFor(contact_jid);
var view = converse.chatboxviews.get(contact_jid);
@ -54,11 +74,6 @@
.c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree();
converse.chatboxes.onMessage(msg);
});
it("Show the control box", function () {
test_utils.openControlBox();
test_utils.openContactsPanel();
});
});
}, window, mock, test_utils));
}));