diff --git a/plugins/catalog-react/src/alpha/blueprints/EntityContextMenuItemBlueprint.test.tsx b/plugins/catalog-react/src/alpha/blueprints/EntityContextMenuItemBlueprint.test.tsx
index 5a272c33ca..81272de8b4 100644
--- a/plugins/catalog-react/src/alpha/blueprints/EntityContextMenuItemBlueprint.test.tsx
+++ b/plugins/catalog-react/src/alpha/blueprints/EntityContextMenuItemBlueprint.test.tsx
@@ -77,7 +77,7 @@ describe('EntityContextMenuItemBlueprint', () => {
`);
});
- it('should filter items based on the filter function', async () => {
+ it('should exclude items based on the filter function', async () => {
const extension = EntityContextMenuItemBlueprint.make({
name: 'test',
params: {
@@ -107,6 +107,36 @@ describe('EntityContextMenuItemBlueprint', () => {
});
});
+ it('should include items based on the filter function', async () => {
+ const extension = EntityContextMenuItemBlueprint.make({
+ name: 'test',
+ params: {
+ icon: Icon,
+ filter: e => e.kind.toLowerCase() === 'component',
+ useProps: () => ({
+ title: 'Test',
+ onClick: () => {},
+ }),
+ },
+ });
+
+ renderInTestApp(
+
+ {createExtensionTester(extension).reactElement()}
+ ,
+ );
+
+ await waitFor(() => {
+ expect(screen.getByText('Test')).toBeInTheDocument();
+ });
+ });
+
it('should render a menu item', async () => {
const extension = EntityContextMenuItemBlueprint.make({
name: 'test',