Skip to content

Commit

Permalink
feat(viz): Remove nodes from the canvas
Browse files Browse the repository at this point in the history
This pull request adds the possibility to remove individual nodes from an integration, currently, it supports `Camel Routes` only

Notes:
* The `otherwise` property from the `choice` node remains due to a configuration in the `VisualizationNode` class, we'll tackle this in a separate pull request.
* Removing nodes from `Pipe` and `KameletBinding` is waiting until we receive the entire flow into the `PieVisualEntity` class

Fixes: #78
  • Loading branch information
lordrip committed Oct 17, 2023
1 parent 8c4255c commit ee63d54
Show file tree
Hide file tree
Showing 13 changed files with 747 additions and 45 deletions.
16 changes: 16 additions & 0 deletions packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { render, waitFor } from '@testing-library/react';
import { CamelRouteVisualEntity } from '../../../models/visualization/flows';
import { camelRouteJson } from '../../../stubs/camel-route';
import { Canvas } from './Canvas';

describe('Canvas', () => {
it('should render correctly', async () => {
const entity = new CamelRouteVisualEntity(camelRouteJson.route);

const result = render(<Canvas entities={[entity]} />);

await waitFor(async () => expect(result.container.querySelector('#fit-to-screen')).toBeInTheDocument());

expect(result.container).toMatchSnapshot();
});
});
Loading

0 comments on commit ee63d54

Please sign in to comment.