How to use the @jupyterlab/cells/src.InputArea function in @jupyterlab/cells

To help you get started, we’ve selected a few @jupyterlab/cells examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should be the model used by the input area', () => {
        const widget = new InputArea({ model });
        expect(widget.model).to.equal(model);
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should dispose of the resources used by the widget', () => {
        const widget = new InputArea({ model });
        widget.dispose();
        expect(widget.isDisposed).to.equal(true);
        widget.dispose();
        expect(widget.isDisposed).to.equal(true);
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should be called to show the editor', () => {
        const widget = new InputArea({ model });
        const rendered = new Widget();
        Widget.attach(widget, document.body);
        widget.renderInput(rendered);
        widget.showEditor();
        expect(rendered.isAttached).to.equal(false);
        widget.dispose();
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should be the code editor used by the cell', () => {
        const widget = new InputArea({ model });
        expect(widget.editor.host).to.equal(widget.editorWidget.node);
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should create an input area widget', () => {
        const widget = new InputArea({ model });
        expect(widget).to.be.an.instanceof(InputArea);
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should be the content factory used by the input area', () => {
        const widget = new InputArea({ model });
        expect(widget.contentFactory).to.equal(InputArea.defaultContentFactory);
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should render the widget', () => {
        const widget = new InputArea({ model });
        const rendered = new Widget();
        Widget.attach(widget, document.body);
        widget.renderInput(rendered);
        expect(rendered.isAttached).to.equal(true);
        widget.dispose();
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should change the value of the input prompt', () => {
        const widget = new InputArea({ model });
        const prompt = widget.node.querySelector(`.${PROMPT_CLASS}`);
        expect(prompt.textContent).to.be.empty;
        widget.setPrompt('foo');
        expect(prompt.textContent).to.contain('foo');
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should be the editor widget used by the input area', () => {
        const widget = new InputArea({ model });
        expect(widget.editorWidget).to.be.an.instanceof(CodeEditorWrapper);
      });
    });
github yuvipanda / simplest-notebook / tests / test-cells / src / inputarea.spec.ts View on Github external
it('should be the prompt node used by the cell', () => {
        const widget = new InputArea({ model });
        expect(widget.promptNode.className).to.contain('jp-InputPrompt');
      });
    });