Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
treblereel committed Feb 18, 2021
1 parent 04e8ddf commit b1a5f5c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.kie.workbench.common.dmn.client.widgets.grid.columns.factory.dom;

import com.google.gwt.dom.client.Document;
import elemental2.dom.Element;
import jsinterop.base.Js;
import org.gwtbootstrap3.client.ui.base.TextBoxBase;
import org.kie.workbench.common.dmn.client.widgets.codecompletion.MonacoPropertiesFactory;
Expand All @@ -31,10 +32,17 @@ public class MonacoEditorWidget extends TextBoxBase {

public MonacoEditorWidget() {
super(Document.get().createDivElement());
codeEditor = monacoEditor.create(Js.uncheckedCast(getElement()),
codeEditor = monacoEditor.create(getMonacoEditorWidgetElement(),
monacoPropertiesFactory.getConstructionOptions());
}

/**
* for testing
*/
public Element getMonacoEditorWidgetElement() {
return Js.uncheckedCast(getElement());
}

/**
* for testing
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ static class AutocompleteTextAreaDOMElementFactoryFake extends AutocompleteTextA
super(gridPanel, gridLayer, gridWidget, sessionManager, sessionCommandManager, hasNoValueCommand, hasValueCommand);
}

@Override
public MonacoEditorWidget createWidget() {
return mock(MonacoEditorWidget.class);
}

@Override
protected MonacoEditorDOMElement makeMonacoEditorDOMElement(final MonacoEditorWidget widget,
final GridLayer gridLayer,
Expand Down

0 comments on commit b1a5f5c

Please sign in to comment.