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);
-        });
-
       });
 
     });