You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In sirius-web-sample-application/src/test/java/org/eclipse/sirius/web/sample/tests/integrations/diagrams, add a new class named DiagramLayoutIntegrationTests which should look like this:
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class DiagramLayoutIntegrationTests extends AbstractIntegrationTests {
@Autowired
private IDiagramLayoutEngine diagramLayoutEngine;
@Autowired
private ISVGDiagramExportService svgDiagramExportService;
@Test
@DisplayName("Given a diagram, when the layout is performed, then valid layout data are computed")
public void givenDiagramWhenLayoutIsPerformedThenValidLayoutDataAreComputed() {
var diagramLayoutConfiguration = new TestDiagramLayoutConfigurationBuilder().getConfiguration();
// TestDiagramLayoutConfigurationBuilder to be created, we can start with a basic configuration for now
var diagramLayoutData = this.diagramLayoutEngine.layout(diagramLayoutConfiguration);
var builder = new TestDiagramBuilder(); // The existing TestDiagramBuilder and TestDiagramLayoutConfigurationBuilder should be able to produce coherent types of diagrams
var diagram = Diagram.newDiagram(builder.getDiagram("diagram"))
.nodes(List.of(builder.getNode("node")))
.build();
var layoutedDiagram = Diagram.newDiagram(diagram)
.layoutData(diagramLayoutData)
.build();
// Improve DiagramAssert to ensure that every elements has some layout data (size, position, etc)
var svg = this.svgDiagramExportService.export(layoutedDiagram);
// Log the SVG to help us see the end result for example
}
}
The text was updated successfully, but these errors were encountered:
In
sirius-web-sample-application/src/test/java/org/eclipse/sirius/web/sample/tests/integrations/diagrams
, add a new class namedDiagramLayoutIntegrationTests
which should look like this:The text was updated successfully, but these errors were encountered: