Browse Source

Fix tests and a few other small issues.

Jason Grout 6 years ago
parent
commit
1197fdf358

+ 1 - 0
packages/console-extension/package.json

@@ -41,6 +41,7 @@
     "@jupyterlab/rendermime": "^0.19.1",
     "@phosphor/algorithm": "^1.1.2",
     "@phosphor/coreutils": "^1.3.0",
+    "@phosphor/properties": "^1.1.2",
     "@phosphor/widgets": "^1.6.0"
   },
   "devDependencies": {

+ 0 - 1
packages/console/src/foreign.ts

@@ -29,7 +29,6 @@ export class ForeignHandler implements IDisposable {
       this.onIOPubMessage,
       this
     );
-    // this._factory = options.cellFactory;
     this._parent = options.parent;
   }
 

+ 8 - 9
tests/test-console/src/foreign.spec.ts

@@ -27,6 +27,12 @@ class TestParent extends Panel implements ForeignHandler.IReceiver {
   addCell(cell: CodeCell): void {
     this.addWidget(cell);
   }
+  createCodeCell(): CodeCell {
+    const contentFactory = NBTestUtils.createCodeCellFactory();
+    const model = new CodeCellModel({});
+    const cell = new CodeCell({ model, rendermime, contentFactory });
+    return cell;
+  }
 }
 
 class TestHandler extends ForeignHandler {
@@ -64,12 +70,6 @@ class TestHandler extends ForeignHandler {
 
 const rendermime = defaultRenderMime();
 
-function cellFactory(): CodeCell {
-  const contentFactory = NBTestUtils.createCodeCellFactory();
-  const model = new CodeCellModel({});
-  const cell = new CodeCell({ model, rendermime, contentFactory });
-  return cell;
-}
 const relevantTypes = [
   'execute_input',
   'execute_result',
@@ -99,7 +99,7 @@ describe('@jupyterlab/console', () => {
 
     beforeEach(() => {
       const parent = new TestParent();
-      handler = new TestHandler({ session, parent, cellFactory });
+      handler = new TestHandler({ session, parent });
     });
 
     afterEach(() => {
@@ -166,8 +166,7 @@ describe('@jupyterlab/console', () => {
         const parent = new TestParent();
         handler = new TestHandler({
           session: handler.session,
-          parent,
-          cellFactory
+          parent
         });
         expect(handler.parent).to.equal(parent);
       });

+ 0 - 1
tests/test-console/src/widget.spec.ts

@@ -92,7 +92,6 @@ describe('console/widget', () => {
 
       it('should reflect the contents of the widget', async () => {
         const force = true;
-        widget.showAllActivity = true;
         Widget.attach(widget, document.body);
         await (widget.session as ClientSession).initialize();
         await widget.execute(force);