|
34 | 34 | import org.eclipse.sirius.components.view.emf.diagram.IDiagramIdProvider; |
35 | 35 | import org.eclipse.sirius.web.tests.services.api.IGivenInitialServerState; |
36 | 36 | import org.eclipse.syson.AbstractIntegrationTests; |
| 37 | +import org.eclipse.syson.GivenSysONServer; |
37 | 38 | import org.eclipse.syson.application.controllers.diagrams.testers.ToolTester; |
38 | 39 | import org.eclipse.syson.application.data.GeneralViewEmptyTestProjectData; |
39 | 40 | import org.eclipse.syson.services.diagrams.DiagramDescriptionIdProvider; |
|
48 | 49 | import org.junit.jupiter.api.Test; |
49 | 50 | import org.springframework.beans.factory.annotation.Autowired; |
50 | 51 | import org.springframework.boot.test.context.SpringBootTest; |
51 | | -import org.springframework.test.context.jdbc.Sql; |
52 | | -import org.springframework.test.context.jdbc.SqlConfig; |
53 | 52 | import org.springframework.transaction.annotation.Transactional; |
54 | 53 |
|
55 | 54 | import reactor.core.publisher.Flux; |
@@ -94,11 +93,9 @@ public void beforeEach() { |
94 | 93 | this.givenInitialServerState.initialize(); |
95 | 94 | } |
96 | 95 |
|
97 | | - @Test |
98 | | - @Sql(scripts = { GeneralViewEmptyTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, |
99 | | - config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) |
100 | | - @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) |
101 | 96 | @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") |
| 97 | + @GivenSysONServer({ GeneralViewEmptyTestProjectData.SCRIPT_PATH }) |
| 98 | + @Test |
102 | 99 | public void checkPerformActionRevealInState() { |
103 | 100 | var flux = this.givenSubscriptionToDiagram(); |
104 | 101 |
|
@@ -160,9 +157,8 @@ public void checkPerformActionRevealInState() { |
160 | 157 | assertThat(diagram.getEdges()).isEmpty(); |
161 | 158 | DiagramNavigator navigator = new DiagramNavigator(diagram); |
162 | 159 | Collection<Node> visibleNodes = navigator.findAllNodes().stream().filter(node -> node.getState() == ViewModifier.Normal).toList(); |
163 | | - assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("actions"))).hasSize(1).allMatch(node -> node.getChildNodes().size() == 1); |
164 | 160 | assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("perform actions"))).hasSize(1).allMatch(node -> node.getChildNodes().size() == 1); |
165 | | - assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("ref do ::> action1"))).hasSize(2); |
| 161 | + assertThat(visibleNodes.stream().filter(node -> node.getInsideLabel().getText().equals("ref do ::> action1"))).hasSize(1); |
166 | 162 | }, () -> fail("Missing diagram")); |
167 | 163 |
|
168 | 164 | StepVerifier.create(flux) |
|
0 commit comments