Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOGITO-4343: Fix JSONIX model generation with gwt 2.9 #3582

Closed
wants to merge 2 commits into from

Conversation

treblereel
Copy link
Contributor

@treblereel treblereel commented Mar 1, 2021

JIRA: https://issues.redhat.com/browse/KOGITO-4343

Related PRs:
kiegroup/gwt-jsonix-schema-compiler#11
kiegroup/droolsjbpm-build-bootstrap#1606
#3570
#3562
#3582

to test localy set gwt-jsonix-schema-compiler version to 1.3.0-SNAPSHOT

@yesamer ^^

@yesamer
Copy link
Member

yesamer commented Mar 2, 2021

@treblereel What is the difference with this PR? #3570

@tiagobento
Copy link
Contributor

@yesamer The other one was not supposed to be there anymore. Can you please review this and the related PRs? cc @karreiro

@tiagobento tiagobento requested a review from jomarko March 16, 2021 21:56
Copy link
Member

@yesamer yesamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@treblereel LGTM, thank you! Just a minor question.

@@ -125,7 +125,7 @@ public void checkAttachDomElement() {
domElementOnDisplay);
}

@Test
//@Test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@treblereel Why is this test ignored?

Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @treblereel. The PR looks great! 🚀 Can we uncomment the test that @yesamer mentioned? :-)

@treblereel
Copy link
Contributor Author

wrong branch has been pushed ... let me fix it

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@treblereel
Copy link
Contributor Author

java.io.IOException: No space left on device :(

Copy link
Contributor

@karreiro karreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @treblereel :-)

Copy link

@jomarko jomarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What webapp should I use to verify this please?

I used kie-wb-common/kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-testing, however that has editor tab always empty.

Could someone please confirm that is bug on master? not related tot his PR?

Screenshot from 2021-03-30 13-29-58

Comment on lines -281 to -340
@Test
public void testConnect() {
final DMNMarshaller dmnMarshaller = new DMNMarshaller();
final JSIDMNDiagram diagram = mock(JSIDMNDiagram.class);
final List<String> dmnDiagramElementIds = mock(List.class);
final Definitions definitionsStunnerPojo = mock(Definitions.class);
final List<JSIDMNEdge> dmnEdges = new ArrayList<>();

final Node<?, ?> node = mock(Node.class);
final List inEdges = new ArrayList<>();
final Edge edge = mock(Edge.class);
final Node sourceNode = mock(Node.class);
final View sourceView = mock(View.class);
final ViewConnector viewConnector = mock(ViewConnector.class);
final DiscreteConnection sourceConnection = mock(DiscreteConnection.class);
final DiscreteConnection targetConnection = mock(DiscreteConnection.class);
final View<?> view = mock(View.class);

inEdges.add(edge);
when(edge.getSourceNode()).thenReturn(sourceNode);
when(sourceNode.getContent()).thenReturn(sourceView);

when(node.getInEdges()).thenReturn(inEdges);
when(edge.getContent()).thenReturn(viewConnector);
when(viewConnector.getControlPoints()).thenReturn(new ControlPoint[]{});
when(sourceConnection.isAuto()).thenReturn(true);
when(targetConnection.isAuto()).thenReturn(true);
when(diagram.getName()).thenReturn("dmnEdge");
when(definitionsStunnerPojo.getDefaultNamespace()).thenReturn("org.edge");

when(viewConnector.getSourceConnection()).thenReturn(Optional.of(sourceConnection));
when(viewConnector.getTargetConnection()).thenReturn(Optional.of(targetConnection));
dmnMarshaller.connect(diagram,
dmnDiagramElementIds,
definitionsStunnerPojo,
dmnEdges,
node,
view);

when(viewConnector.getSourceConnection()).thenReturn(Optional.empty());
when(viewConnector.getTargetConnection()).thenReturn(Optional.empty());
dmnMarshaller.connect(diagram,
dmnDiagramElementIds,
definitionsStunnerPojo,
dmnEdges,
node,
view);

when(viewConnector.getSourceConnection()).thenReturn(Optional.of(sourceConnection));
when(viewConnector.getTargetConnection()).thenReturn(Optional.empty());
dmnMarshaller.connect(diagram,
dmnDiagramElementIds,
definitionsStunnerPojo,
dmnEdges,
node,
view);

verify(sourceConnection).isAuto();
verify(targetConnection).isAuto();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need to remove this test please?

@jomarko jomarko requested review from jomarko and removed request for jomarko April 9, 2021 06:19
@jomarko
Copy link

jomarko commented Apr 9, 2021

No resources to review this anymore. Please proceed without my further review.

@yesamer
Copy link
Member

yesamer commented Jul 13, 2021

@karreiro @treblereel I think this can close, considering Kogito asserts are no more present in this repo.

@yesamer yesamer closed this Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants