Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ The property `SysONTestsProperties#ELASTICSEARCH` has been removed, tests that r
- https://github.com/eclipse-syson/syson/issues/1887[#1887] [export] Export fails to escape some names when using qualified name.
- https://github.com/eclipse-syson/syson/issues/1953[#1953] [import] Fix an issue where `TransitionUsage` with `SendActionUsage` were not properly resolved.
- https://github.com/eclipse-syson/syson/issues/1973[#1973] [import] Fix an error during textual import when resolving the name of an unnamed redefined `Feature`.
- https://github.com/eclipse-syson/syson/issues/1860[#1860] [diagrams] Add a precondition for compartment item node descriptions in order to filter out unwanted types.
For example `ViewUsage` elements are no longer rendered in _parts_ compartments.

=== Improvements

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,9 @@ public void checkIncludeUsageActionCreation() {
.verify(Duration.ofSeconds(10));
}

@Test
@DisplayName("GIVEN an IncludeUseCaseUsage, WHEN reconnecting the target, THEN the new target of the IncludeUseCaseUsage is correct")
@GivenSysONServer({ IncludeUseCaseUsageProjectData.SCRIPT_PATH })

@Test
public void reconnectIncludeUsaceCaseUsageTarget() {
var flux = this.givenSubscriptionToDiagram();

Expand Down Expand Up @@ -210,9 +209,9 @@ public void reconnectIncludeUsaceCaseUsageTarget() {
.verify(Duration.ofSeconds(10));
}

@Test
@DisplayName("GIVEN an IncludeUseCaseUsage, WHEN reconnecting the source, THEN the new source of the IncludeUseCaseUsage is correct")
@GivenSysONServer({ IncludeUseCaseUsageProjectData.SCRIPT_PATH })
@Test
public void reconnectIncludeUseCaseUsageSource() {
var flux = this.givenSubscriptionToDiagram();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.eclipse.sirius.components.view.emf.diagram.IDiagramIdProvider;
import org.eclipse.sirius.web.tests.services.api.IGivenInitialServerState;
import org.eclipse.syson.AbstractIntegrationTests;
import org.eclipse.syson.GivenSysONServer;
import org.eclipse.syson.application.controllers.diagrams.testers.ToolTester;
import org.eclipse.syson.application.data.GeneralViewEmptyTestProjectData;
import org.eclipse.syson.services.diagrams.DiagramDescriptionIdProvider;
Expand All @@ -48,8 +49,6 @@
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.context.jdbc.SqlConfig;
import org.springframework.transaction.annotation.Transactional;

import reactor.core.publisher.Flux;
Expand Down Expand Up @@ -94,11 +93,9 @@ public void beforeEach() {
this.givenInitialServerState.initialize();
}

@Test
@Sql(scripts = { GeneralViewEmptyTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD,
config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED))
@Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED))
@DisplayName("GIVEN a General View with a state and action, WHEN invoking do action with referenced action, THEN the PerformActionUsage is visible in the state")
@GivenSysONServer({ GeneralViewEmptyTestProjectData.SCRIPT_PATH })
@Test
public void checkPerformActionRevealInState() {
var flux = this.givenSubscriptionToDiagram();

Expand Down Expand Up @@ -160,9 +157,8 @@ public void checkPerformActionRevealInState() {
assertThat(diagram.getEdges()).isEmpty();
DiagramNavigator navigator = new DiagramNavigator(diagram);
Collection<Node> visibleNodes = navigator.findAllNodes().stream().filter(node -> node.getState() == ViewModifier.Normal).toList();
assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("actions"))).hasSize(1).allMatch(node -> node.getChildNodes().size() == 1);
assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("perform actions"))).hasSize(1).allMatch(node -> node.getChildNodes().size() == 1);
assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("ref do ::> action1"))).hasSize(2);
assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("ref do ::> action1"))).hasSize(1);
}, () -> fail("Missing diagram"));

StepVerifier.create(flux)
Expand Down
Loading
Loading