浏览代码

Update test

Steven Silvester 8 年之前
父节点
当前提交
5bf7d54c25
共有 1 个文件被更改,包括 2 次插入12 次删除
  1. 2 12
      test/src/notebook/widget.spec.ts

+ 2 - 12
test/src/notebook/widget.spec.ts

@@ -944,27 +944,17 @@ describe('notebook/widget', () => {
 
       context('blur', () => {
 
-        it('should preserve the mode', () => {
+        it('should set the mode to command', () => {
           simulate(widget.node, 'focus');
           widget.mode = 'edit';
           let other = document.createElement('div');
           simulate(widget.node, 'blur', { relatedTarget: other });
-          expect(widget.mode).to.be('edit');
+          expect(widget.mode).to.be('command');
           MessageLoop.sendMessage(widget, Widget.Msg.ActivateRequest);
           expect(widget.mode).to.be('edit');
           expect(widget.activeCell.editor.hasFocus()).to.be(true);
         });
 
-        it('should give focus back to the notebook', () => {
-          simulate(widget.node, 'focus');
-          let other = document.createElement('div');
-          simulate(widget.node, 'blur', { relatedTarget: other });
-          expect(widget.mode).to.be('command');
-          MessageLoop.sendMessage(widget, Widget.Msg.ActivateRequest);
-          expect(widget.mode).to.be('command');
-          expect(widget.activeCell.editor.hasFocus()).to.be(false);
-        });
-
       });
 
     });