How to use the @jupyterlab/cells.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 jupyterlab / jupyterlab-data-explorer / 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 jupyterlab / jupyterlab-data-explorer / 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 jupyterlab / jupyterlab-data-explorer / 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 jupyterlab / jupyterlab-data-explorer / 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 jupyterlab / jupyterlab-data-explorer / 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 jupyterlab / jupyterlab-data-explorer / 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 jupyterlab / jupyterlab / 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');
      });
    });
github jupyterlab / jupyterlab-data-explorer / 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');
      });
    });
github jupyterlab / jupyterlab / 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 jupyterlab / jupyterlab / 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);
      });
    });