Commit c3456eee authored by JC Brand's avatar JC Brand

Test fixes.

- Call `_initialize` after tests have run
  Since the tests call `teardDown`, which removes all chatboxes.
- Open controlbox when navigating to panel
parent e39999f3
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
afterEach(function () { afterEach(function () {
test_utils.closeControlBox(); test_utils.closeControlBox();
converse.connection = original_connection; converse.connection = original_connection;
converse._initialize();
}); });
it("is not available unless allow_registration=true", function () { it("is not available unless allow_registration=true", function () {
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
}; };
utils.openRoomsPanel = function () { utils.openRoomsPanel = function () {
utils.openControlBox();
var cbview = converse.chatboxviews.get('controlbox'); var cbview = converse.chatboxviews.get('controlbox');
var $tabs = cbview.$el.find('#controlbox-tabs'); var $tabs = cbview.$el.find('#controlbox-tabs');
$tabs.find('li').last().find('a').click(); $tabs.find('li').last().find('a').click();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment