Skip to content

Commit

Permalink
JBPM-5917 Change the order of "Tools" and data object/process variabl…
Browse files Browse the repository at this point in the history
…e dropdown (#989)
  • Loading branch information
alessioscalici authored and manstis committed Aug 8, 2017
1 parent dc1eb6b commit 43a3af8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,16 @@ public void doLoadContent(FormModelerContent content) {

protected void loadLayoutEditor() {
layoutEditor.clear();

loadAvailableFields();

layoutEditor.init(editorHelper.getContent().getDefinition().getName(),
getLayoutComponent(),
translationService
.getTranslation(FormEditorConstants.FormEditorPresenterLayoutTitle),
translationService
.getTranslation(FormEditorConstants.FormEditorPresenterLayoutSubTitle));
loadAvailableFields();

layoutEditor.loadLayout(editorHelper.getContent().getDefinition().getLayoutTemplate());
}

Expand Down Expand Up @@ -267,7 +270,7 @@ public FormDefinition getFormDefinition() {
return editorHelper.getFormDefinition();
}

private void loadAvailableFields() {
protected void loadAvailableFields() {
FormModel model = editorHelper.getFormDefinition().getModel();
if (!(model instanceof HasFormModelProperties)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ public void testLoad() {
public void testLoadWithContent() {
testLoad();

presenter.loadContent();
FormEditorPresenter presenterSpy = spy(presenter);
presenterSpy.loadContent();

verify(presenterSpy).loadAvailableFields();
verify(layoutEditorMock,
times(2)).addDraggableComponentGroup(any());

verify(layoutEditorMock,
times(3)).clear();
verify(layoutEditorMock,
times(2)).loadLayout(content.getDefinition().getLayoutTemplate());
verify(view,
times(2)).init(presenter);
times(2)).init(any());
verify(view,
times(2)).setupLayoutEditor(layoutEditorMock);
}
Expand Down

0 comments on commit 43a3af8

Please sign in to comment.