diff --git a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.test.tsx b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.test.tsx index d1fab823be..ef77f7615f 100644 --- a/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityLifecyclePicker/EntityLifecyclePicker.test.tsx @@ -184,7 +184,6 @@ describe('', () => { updateFilters, queryParameters: { lifecycles: ['production'] }, backendEntities: sampleEntities, - q, }} > @@ -194,4 +193,21 @@ describe('', () => { lifecycles: new EntityLifecycleFilter(['production']), }); }); + it('removes lifecycles from filters if there are no available lifecycles', () => { + const updateFilters = jest.fn(); + render( + + + , + ); + expect(updateFilters).toHaveBeenLastCalledWith({ + lifecycles: undefined, + }); + }); }); diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx index 6eebaa2409..b6e928b519 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.test.tsx @@ -207,4 +207,21 @@ describe('', () => { owners: new EntityOwnerFilter(['team-b']), }); }); + it('removes owners from filters if there are none available', () => { + const updateFilters = jest.fn(); + render( + + + , + ); + expect(updateFilters).toHaveBeenLastCalledWith({ + owners: undefined, + }); + }); });