Skip to content

Commit

Permalink
fix(storybook): Add missing VisibleFlowsPovider to CanvasForm
Browse files Browse the repository at this point in the history
  • Loading branch information
lordrip committed Apr 4, 2024
1 parent f9c447e commit 41aeea4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/ui-tests/stories/canvas/CanvasSideBar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import {
CamelRouteVisualEntity,
CanvasNode,
CanvasSideBar,
IVisualizationNode,
IVisualizationNodeData,
NodeIconResolver,
VisibleFlowsProvider,
VisualComponentSchema,
camelRouteJson,
} from '@kaoto-next/ui/testing';
import { Meta, StoryFn } from '@storybook/react';
import { useState } from 'react';
Expand Down Expand Up @@ -53,6 +56,7 @@ const selectedNode: CanvasNode = {
},
} as VisualComponentSchema;
},
getBaseEntity: () => new CamelRouteVisualEntity(camelRouteJson.route),
} as IVisualizationNode,
},
};
Expand All @@ -75,6 +79,7 @@ const unknownSelectedNode: CanvasNode = {
definition: null,
} as VisualComponentSchema;
},
getBaseEntity: () => new CamelRouteVisualEntity(camelRouteJson.route),
} as IVisualizationNode,
},
};
Expand All @@ -87,7 +92,11 @@ export default {
const Template: StoryFn<typeof CanvasSideBar> = (args) => {
const [isModalOpen, setIsModalOpen] = useState(false);
const handleClose = () => setIsModalOpen(!isModalOpen);
return <CanvasSideBar {...args} onClose={handleClose} />;
return (
<VisibleFlowsProvider>
<CanvasSideBar {...args} onClose={handleClose} />
</VisibleFlowsProvider>
);
};

export const ProcessorNode = Template.bind({});
Expand Down

0 comments on commit 41aeea4

Please sign in to comment.