diff --git a/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx b/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx
index c32c333e6..72e643fc3 100644
--- a/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx
+++ b/packages/ui/src/components/Visualization/Canvas/Canvas.test.tsx
@@ -1,12 +1,13 @@
-import { render, waitFor, fireEvent, screen} from '@testing-library/react';
+import { fireEvent, render, screen, waitFor } from '@testing-library/react';
+import { act } from 'react-dom/test-utils';
+import { CamelRouteResource, KameletResource } from '../../../models/camel';
import { CamelRouteVisualEntity } from '../../../models/visualization/flows';
+import { EntitiesContext } from '../../../providers';
import { CatalogModalContext } from '../../../providers/catalog-modal.provider';
-import { VisibleFLowsContextResult } from '../../../providers/visible-flows.provider';
-import { CamelRouteResource, KameletResource } from '../../../models/camel';
+import { VisibleFLowsContextResult, VisibleFlowsContext } from '../../../providers/visible-flows.provider';
+import { TestProvidersWrapper } from '../../../stubs';
import { camelRouteJson } from '../../../stubs/camel-route';
import { kameletJson } from '../../../stubs/kamelet-route';
-import { TestProvidersWrapper } from '../../../stubs';
-import { act } from 'react-dom/test-utils';
import { Canvas } from './Canvas';
describe('Canvas', () => {
@@ -43,32 +44,44 @@ describe('Canvas', () => {
});
it('should be able to delete the routes', async () => {
- const camelRouteResource = new CamelRouteResource(camelRouteJson);
- const routeEntity = camelRouteResource.getVisualEntities();
- const removeSpy = jest.spyOn(camelRouteResource, 'removeEntity');
+ const camelResource = new CamelRouteResource(camelRouteJson);
+ const routeEntity = camelResource.getVisualEntities();
+ const removeSpy = jest.spyOn(camelResource, 'removeEntity');
+ const setCurrentSchemaTypeSpy = jest.fn();
+ const updateEntitiesFromCamelResourceSpy = jest.fn();
+ const updateSourceCodeFromEntitiesSpy = jest.fn();
render(
-