Browse Source

Attach panel to document in test

Steven Silvester 8 years ago
parent
commit
74f4e6dab3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      test/src/notebook/notebook/default-toolbar.spec.ts

+ 2 - 0
test/src/notebook/notebook/default-toolbar.spec.ts

@@ -219,10 +219,12 @@ describe('notebook/notebook/default-toolbar', () => {
 
       it('should restart the kernel when the dialog is accepted', (done) => {
         let button = ToolbarItems.createRestartButton(panel);
+        panel.attach(document.body);
         button.attach(document.body);
         button.node.click();
         acceptDialog(panel.node).then(() => {
           expect(context.kernel.status).to.be('restarting');
+          panel.dispose();
           button.dispose();
           done();
         });