Skip to content

Commit

Permalink
feat(Canvas): Add containers for branches
Browse files Browse the repository at this point in the history
Currently, all children are rendered as individual nodes in the Canvas,
making complicated to understand when a step belongs to a parent EIP or
if it comes as a next step in the Camel Route.

This commit adds support for rendering EIP branches as containers.

fix: #368
  • Loading branch information
lordrip committed Aug 8, 2024
1 parent 45c4d2f commit 3ebd65b
Show file tree
Hide file tree
Showing 25 changed files with 6,621 additions and 821 deletions.
2 changes: 1 addition & 1 deletion packages/ui-tests/cypress/support/next-commands/design.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Cypress.Commands.add('selectCamelRouteType', (type: string, subType?: string) =>

Cypress.Commands.add('selectRuntimeVersion', (type: string) => {
cy.hoverOnRuntime(type);
cy.get(`[data-testid^="runtime-selector-Camel ${type}"] button.pf-v5-c-menu__item`).click({ force: true });
cy.get(`[data-testid^="runtime-selector-Camel ${type}"] button.pf-v5-c-menu__item`).first().click({ force: true });
cy.waitSchemasLoading();

cy.get('[data-testid="visualization-empty-state"]').should('exist');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const setHeaderNode = rootNode.getChildren()![0].getChildren()![0];
const setHeaderNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const marshalNode = rootNode.getChildren()![0].getChildren()![0];
const marshalNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -267,7 +267,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const loadBalanceNode = rootNode.getChildren()![0].getChildren()![0];
const loadBalanceNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -360,7 +360,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const setHeaderNode = rootNode.getChildren()![0].getChildren()![0];
const setHeaderNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -420,7 +420,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const setHeaderNode = rootNode.getChildren()![0].getChildren()![0];
const setHeaderNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -485,7 +485,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const marshalNode = rootNode.getChildren()![0].getChildren()![0];
const marshalNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -535,7 +535,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const marshalNode = rootNode.getChildren()![0].getChildren()![0];
const marshalNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -591,7 +591,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const loadBalanceNode = rootNode.getChildren()![0].getChildren()![0];
const loadBalanceNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down Expand Up @@ -641,7 +641,7 @@ describe('CanvasFormTabs', () => {
} as RouteDefinition;
const entity = new CamelRouteVisualEntity(camelRoute);
const rootNode: IVisualizationNode = entity.toVizNode();
const loadBalanceNode = rootNode.getChildren()![0].getChildren()![0];
const loadBalanceNode = rootNode.getChildren()![1];
const selectedNode = {
id: '1',
type: 'node',
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 3ebd65b

Please sign in to comment.