Browse Source

wip app shell tests

Steven Silvester 8 years ago
parent
commit
0f7073cbf6
3 changed files with 251 additions and 48 deletions
  1. 1 1
      test/src/application/loader.spec.ts
  2. 202 0
      test/src/application/shell.spec.ts
  3. 48 47
      test/src/index.ts

+ 1 - 1
test/src/application/loader.spec.ts

@@ -5,7 +5,7 @@ import expect = require('expect.js');
 
 import {
   ModuleLoader
-} from '../../../lib/application/loader';
+} from '../../../lib/application';
 
 
 describe('ModuleLoader', () => {

+ 202 - 0
test/src/application/shell.spec.ts

@@ -0,0 +1,202 @@
+// Copyright (c) Jupyter Development Team.
+// Distributed under the terms of the Modified BSD License.
+
+import expect = require('expect.js');
+
+import {
+  ApplicationShell
+} from '../../../lib/application';
+
+
+describe('ApplicationShell', () => {
+
+  let shell: ApplicationShell;
+
+  beforeEach(() => {
+    shell = new ApplicationShell();
+  });
+
+  describe('#constructor()', () => {
+
+    it('should create an ApplicationShell instance', () => {
+      expect(shell).to.be.an(ApplicationShell);
+    });
+
+  });
+
+  describe('#currentWidget', () => {
+
+    it('should be the current widget in the shell main area', () => {
+
+    });
+
+  });
+
+  describe('#mainAreaIsEmpty', () => {
+
+    it('should test whether the main area is empty', () => {
+
+    });
+
+  });
+
+  describe('#topAreaIsEmpty', () => {
+
+    it('should test whether the top area is empty', () => {
+
+    });
+
+  });
+
+  describe('#leftAreaIsEmpty', () => {
+
+    it('should test whether the left area is empty', () => {
+
+    });
+
+  });
+
+  describe('#rightAreaIsEmpty', () => {
+
+    it('should test whether the right area is empty', () => {
+
+    });
+
+  });
+
+  describe('#addToTopArea()', () => {
+
+    it('should add a widget to the top area', () => {
+
+    });
+
+    it('should be a no-op if the widget has no id', () => {
+
+    });
+
+    it('should accept options', () => {
+
+    });
+
+  });
+
+  describe('#addToLeftArea()', () => {
+
+    it('should add a widget to the left area', () => {
+
+    });
+
+    it('should be a no-op if the widget has no id', () => {
+
+    });
+
+    it('should accept options', () => {
+
+    });
+
+  });
+
+  describe('#addToRightArea()', () => {
+
+    it('should add a widget to the right area', () => {
+
+    });
+
+    it('should be a no-op if the widget has no id', () => {
+
+    });
+
+    it('should accept options', () => {
+
+    });
+
+  });
+
+  describe('#addToMainArea()', () => {
+
+    it('should add a widget to the main area', () => {
+
+    });
+
+    it('should be a no-op if the widget has no id', () => {
+
+    });
+
+    it('should accept options', () => {
+
+    });
+
+  });
+
+  describe('#activateLeft()', () => {
+
+    it('should activate a widget in the left area', () => {
+
+    });
+
+    it('should be a no-op if the widget is not in the left area', () => {
+
+    });
+
+  });
+
+  describe('#activateRight()', () => {
+
+    it('should activate a widget in the right area', () => {
+
+    });
+
+    it('should be a no-op if the widget is not in the right area', () => {
+
+    });
+
+  });
+
+  describe('#activateTop()', () => {
+
+    it('should activate a widget in the top area', () => {
+
+    });
+
+    it('should be a no-op if the widget is not in the top area', () => {
+
+    });
+
+  });
+
+  describe('#activateMain()', () => {
+
+    it('should activate a widget in the main area', () => {
+
+    });
+
+    it('should be a no-op if the widget is not in the main area', () => {
+
+    });
+
+  });
+
+  describe('#collapseLeft()', () => {
+
+    it('should collapse all widgets in the left area', () => {
+
+    });
+
+  });
+
+  describe('#collapseRight()', () => {
+
+    it('should collapse all widgets in the right area', () => {
+
+    });
+
+  });
+
+  describe('#closeAll()', () => {
+
+    it('should close all of the widgets in the main area', () => {
+
+    });
+
+  });
+});

+ 48 - 47
test/src/index.ts

@@ -1,71 +1,72 @@
 // Copyright (c) Jupyter Development Team.
 // Distributed under the terms of the Modified BSD License.
 
-import './application/loader.spec';
+// import './application/loader.spec';
+import './application/shell.spec';
 
-import './commandlinker/commandlinker.spec';
+// import './commandlinker/commandlinker.spec';
 
-import './common/activitymonitor.spec';
-import './common/instancetracker.spec';
-import './common/observablestring.spec';
-import './common/observablevector.spec';
-import './common/vdom.spec';
+// import './common/activitymonitor.spec';
+// import './common/instancetracker.spec';
+// import './common/observablestring.spec';
+// import './common/observablevector.spec';
+// import './common/vdom.spec';
 
-import './completer/handler.spec';
-import './completer/model.spec';
-import './completer/widget.spec';
+// import './completer/handler.spec';
+// import './completer/model.spec';
+// import './completer/widget.spec';
 
-import './console/content.spec';
-import './console/foreign.spec';
-import './console/history.spec';
-import './console/panel.spec';
+// import './console/content.spec';
+// import './console/foreign.spec';
+// import './console/history.spec';
+// import './console/panel.spec';
 
-import './csvwidget/table.spec';
-import './csvwidget/toolbar.spec';
-import './csvwidget/widget.spec';
+// import './csvwidget/table.spec';
+// import './csvwidget/toolbar.spec';
+// import './csvwidget/widget.spec';
 
-import './dialog/dialog.spec';
+// import './dialog/dialog.spec';
 
-import './docmanager/manager.spec';
-import './docmanager/savehandler.spec';
-import './docmanager/widgetmanager.spec';
+// import './docmanager/manager.spec';
+// import './docmanager/savehandler.spec';
+// import './docmanager/widgetmanager.spec';
 
-import './docregistry/context.spec';
-import './docregistry/default.spec';
-import './docregistry/registry.spec';
+// import './docregistry/context.spec';
+// import './docregistry/default.spec';
+// import './docregistry/registry.spec';
 
-import './filebrowser/crumbs.spec';
-import './filebrowser/model.spec';
+// import './filebrowser/crumbs.spec';
+// import './filebrowser/model.spec';
 
-import './inspector/inspector.spec';
+// import './inspector/inspector.spec';
 
-import './markdownwidget/widget.spec';
+// import './markdownwidget/widget.spec';
 
-import './renderers/renderers.spec';
-import './renderers/latex.spec';
+// import './renderers/renderers.spec';
+// import './renderers/latex.spec';
 
-import './rendermime/rendermime.spec';
+// import './rendermime/rendermime.spec';
 
-import './notebook/cells/editor.spec';
-import './notebook/cells/model.spec';
-import './notebook/cells/widget.spec';
+// import './notebook/cells/editor.spec';
+// import './notebook/cells/model.spec';
+// import './notebook/cells/widget.spec';
 
-import './notebook/common/undo.spec';
+// import './notebook/common/undo.spec';
 
-import './notebook/notebook/actions.spec';
-import './notebook/notebook/default-toolbar.spec';
-import './notebook/notebook/model.spec';
-import './notebook/notebook/modelfactory.spec';
-import './notebook/notebook/panel.spec';
-import './notebook/notebook/trust.spec';
-import './notebook/notebook/widget.spec';
-import './notebook/notebook/widgetfactory.spec';
+// import './notebook/notebook/actions.spec';
+// import './notebook/notebook/default-toolbar.spec';
+// import './notebook/notebook/model.spec';
+// import './notebook/notebook/modelfactory.spec';
+// import './notebook/notebook/panel.spec';
+// import './notebook/notebook/trust.spec';
+// import './notebook/notebook/widget.spec';
+// import './notebook/notebook/widgetfactory.spec';
 
-import './notebook/output-area/model.spec';
-import './notebook/output-area/widget.spec';
+// import './notebook/output-area/model.spec';
+// import './notebook/output-area/widget.spec';
 
-import './notebook/tracker.spec';
+// import './notebook/tracker.spec';
 
-import './toolbar/toolbar.spec';
+// import './toolbar/toolbar.spec';
 
 import 'phosphor/styles/base.css';