浏览代码

Test fixes.

- Call `_initialize` after tests have run
  Since the tests call `teardDown`, which removes all chatboxes.
- Open controlbox when navigating to panel
JC Brand 8 年之前
父节点
当前提交
c3456eeede
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      spec/register.js
  2. 1 0
      tests/utils.js

+ 1 - 0
spec/register.js

@@ -16,6 +16,7 @@
         afterEach(function () {
             test_utils.closeControlBox();
             converse.connection = original_connection;
+            converse._initialize();
         });
 
         it("is not available unless allow_registration=true",  function () {

+ 1 - 0
tests/utils.js

@@ -85,6 +85,7 @@
     };
 
     utils.openRoomsPanel = function () {
+        utils.openControlBox();
         var cbview = converse.chatboxviews.get('controlbox');
         var $tabs = cbview.$el.find('#controlbox-tabs');
         $tabs.find('li').last().find('a').click();