From 7b4fe9028684e740c7adb7f761f6e421f1ef90dc Mon Sep 17 00:00:00 2001 From: JC Brand Date: Mon, 21 Mar 2016 09:58:44 +0000 Subject: [PATCH] Fix the live mockup again (and move to mockup.html) --- mockup/index.html => mockup.html | 4 ++-- mockup/main.js | 1 - mockup/mockup.js | 27 +++++++++++++++++++++------ 3 files changed, 23 insertions(+), 9 deletions(-) rename mockup/index.html => mockup.html (86%) diff --git a/mockup/index.html b/mockup.html similarity index 86% rename from mockup/index.html rename to mockup.html index 365edf9d9..47c0476d2 100644 --- a/mockup/index.html +++ b/mockup.html @@ -7,8 +7,8 @@ - - + + diff --git a/mockup/main.js b/mockup/main.js index 218cdf22f..f9fdbe212 100644 --- a/mockup/main.js +++ b/mockup/main.js @@ -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"; diff --git a/mockup/mockup.js b/mockup/mockup.js index f22512ff0..6a3da3942 100644 --- a/mockup/mockup.js +++ b/mockup/mockup.js @@ -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)); }));